Subject: bug#22432: owner,group and mode options are only applied to the deepest directory

From: Hans Lambermont <[email-masked]>
Date: Fri, 22 Jan 2016 12:42:05 +0100

Package: coreutils
Version: 8.21

When 'install' creates nested directories the options for owner,group and mode
are only applied to the deepest directory.

Example, when I run as root :

install -o "www-data" -g "models" --mode=2775 -d /tmp/00/00/00/00

ls -la /tmp/00/00/00/00
drwxrwsr-x 2 www-data models 4096 Jan 21 16:38 .
drwxr-xr-x 3 root     root   4096 Jan 21 16:38 ..

This shows that /tmp/00/00/00/ is owned by root:root and has 755 as permissions.
The same holds for the just created /tmp/00/00/ and /tmp/00/ .
Only /tmp/00/00/00/00/ is correct.

All created directories should get the given owner,group and mode options.

System: Ubuntu 12.04.5 LTS
GNU coreutils 8.21 (deb 8.21-1ubuntu5.3 amd64)

-- Hans Lambermont