I can't reproduce this actually, but it seems clear that we do apply the umask 
when --preserve=mode (-a) is 
passed.

Curiously files get chmod()ed twice:

root@jak-t14-g3:~# rm -rf b && strace -e chmod coreutils cp -a a b && ls -lh a b
chmod("b/file", 0100700)                = 0
chmod("b/file", 0100775)                = 0
chmod("b/directory", 040775)            = 0
chmod("b/", 040755)                     = 0
+++ exited with 0 +++
a:
total 0
drwxrwxr-x 1 root root 0 Jul 29 13:15 directory
-rwxrwxr-x 1 root root 0 Jul 29 13:11 file

b:
total 0
drwxrwxr-x 1 root root 0 Jul 29 13:15 directory
-rwxrwxr-x 1 root root 0 Jul 29 13:11 file

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to gdk-pixbuf in Ubuntu.
https://bugs.launchpad.net/bugs/2118905

Title:
  cp -a doesn't preserve subdirectories permissions

Status in coreutils:
  New
Status in coreutils-from package in Ubuntu:
  New
Status in gdk-pixbuf package in Ubuntu:
  New
Status in rust-coreutils package in Ubuntu:
  Triaged

Bug description:
  The installed tests are not happy in Questing,
  https://autopkgtest.ubuntu.com/packages/g/gdk-pixbuf

  Debugging it seems like something went weird with the build

  $ ls -ld /usr/libexec/installed-tests/gdk-pixbuf/test-images/*
  drwx------ 2 root root  4096 Jul 28 12:15 
/usr/libexec/installed-tests/gdk-pixbuf/test-images/fail
  drwx------ 2 root root 16384 Jul 28 12:15 
/usr/libexec/installed-tests/gdk-pixbuf/test-images/gif-test-suite
  drwx------ 2 root root  4096 Jul 28 12:15 
/usr/libexec/installed-tests/gdk-pixbuf/test-images/randomly-modified

  
  Those directories are 700, but they are 775 in Debian for the same source and 
in the previous Ubuntu build. Unsure what went wrong, maybe some rust coreutils 
problem?

  Rebuilding in a ppa shows the same result...

To manage notifications about this bug go to:
https://bugs.launchpad.net/coreutils/+bug/2118905/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to