GNU bug report logs - #22432
owner,group and mode options are only applied to the deepest directory

Previous Next

Package: coreutils;

Reported by: Hans Lambermont <hans <at> shapeways.com>

Date: Fri, 22 Jan 2016 15:53:02 UTC

Severity: normal

Tags: notabug

Found in version 8.21

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22432 in the body.
You can then email your comments to 22432 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#22432; Package coreutils. (Fri, 22 Jan 2016 15:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Hans Lambermont <hans <at> shapeways.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 22 Jan 2016 15:53:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Hans Lambermont <hans <at> shapeways.com>
To: bug-coreutils <at> gnu.org
Subject: owner,group and mode options are only applied to the deepest directory
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




Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Fri, 22 Jan 2016 16:46:02 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Fri, 22 Jan 2016 16:46:02 GMT) Full text and rfc822 format available.

Notification sent to Hans Lambermont <hans <at> shapeways.com>:
bug acknowledged by developer. (Fri, 22 Jan 2016 16:46:03 GMT) Full text and rfc822 format available.

Message #12 received at 22432-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: Hans Lambermont <hans <at> shapeways.com>, 22432-done <at> debbugs.gnu.org
Subject: Re: bug#22432: owner, group and mode options are only applied to the
 deepest directory
Date: Fri, 22 Jan 2016 09:45:13 -0700
[Message part 1 (text/plain, inline)]
tag 22432 notabug
thanks

On 01/22/2016 04:42 AM, Hans Lambermont wrote:
> Package: coreutils
> Version: 8.21
> 
> When 'install' creates nested directories the options for owner,group and mode
> are only applied to the deepest directory.

Thanks for the report, but this is documented.  Per 'info install':

   • If the ‘--directory’ (‘-d’) option is given, ‘install’ creates each
     DIRECTORY and any missing parent directories.  Parent directories
     are created with mode ‘u=rwx,go=rx’ (755), regardless of the ‘-m’
     option or the current umask.  *Note Directory Setuid and Setgid::,
     for how the set-user-ID and set-group-ID bits of parent directories
     are inherited.

If you want to create parent directories with specific permissions, you
have to do multiple invocations.

As such, I'm closing this as not a bug, but feel free to add further
comments to this thread.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 20 Feb 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 123 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.