From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 22 10:52:30 2016 Received: (at submit) by debbugs.gnu.org; 22 Jan 2016 15:52:31 +0000 Received: from localhost ([127.0.0.1]:58005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMe0k-00061V-I3 for submit@debbugs.gnu.org; Fri, 22 Jan 2016 10:52:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:55614) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMa6d-00052o-VW for submit@debbugs.gnu.org; Fri, 22 Jan 2016 06:42:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMa6X-0000IK-V2 for submit@debbugs.gnu.org; Fri, 22 Jan 2016 06:42:14 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:34311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMa6X-0000IG-Rh for submit@debbugs.gnu.org; Fri, 22 Jan 2016 06:42:13 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMa6W-0006H8-PB for bug-coreutils@gnu.org; Fri, 22 Jan 2016 06:42:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMa6T-0000Hp-Iu for bug-coreutils@gnu.org; Fri, 22 Jan 2016 06:42:12 -0500 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]:35538) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMa6T-0000Hj-AC for bug-coreutils@gnu.org; Fri, 22 Jan 2016 06:42:09 -0500 Received: by mail-wm0-x22b.google.com with SMTP id r129so209701473wmr.0 for ; Fri, 22 Jan 2016 03:42:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shapeways-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=3L0nLK+bag99vxq5gYF5GhY9+rRMxXQsONy+hw0oFWk=; b=OBXxcPXXKVtV9rfHGeJX/ES9Shnp2T5f198UBLnXT0oJcxalMAidyu1QLQBjgaYZqR su/hPX1lph0Z4Lu9mRiYcPgBGJCVjcYIpsp7HP2iF5FNlPASZXfgBeLiVlofTi4uIuHH WSEv7rcAci9QCiSkwsvlT8hcDM0bRH/dTV9LhnH186TEMpRu4Z7o9tQ/AwKzbbE5usKI wXSS1jwwBJoOVzkP+6JEzgj9TKl6A0sBggleh5cdPjUtgcccuCjwfMVKQwMnXPhXxPJo KeDJCGb/cS0tdSHUgez6oT2lsmwRcznOgaIU74qEP9UiVVNXicIzPPQa29sax+gOrLqT TaMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=3L0nLK+bag99vxq5gYF5GhY9+rRMxXQsONy+hw0oFWk=; b=ADXd0OWYmtQ0OL7viAQOfiLygXTJtB4sqs2olVQBDyKPz1TA0xmSeUAIRtscpoPxP+ KnyQqPCE2mEgsJFqj0vTWMA0dqgpW9mjegk1vLPmgRvus1yrJo0zkQkzHUU+uoqMGwdy cJVHMu0HOzmvpU4biKaDEx4NC0ix9x62pvwMAIvMXRzzs2aDFzIYfQWcs2czM8wOnQS0 n4rWGxO9LEniKVL7enA0qB7LENvG+cwoTkPVSS6lsAy11ZnogkwB+5wgAPuTkBaGK/xt bIxHLfyS/UBSx64Zzf5toezBl4pfWxrHEekag/lEcpOFCGCX3ykSDIfW1GOQtur250fj 0umQ== X-Gm-Message-State: AG10YORdufu0VD0+OaAT/o9ktv6iWBgUz7qfpk0CWBwO54YXAnyHMRSSLVahmu1jQjbyYA== X-Received: by 10.194.174.36 with SMTP id bp4mr2613271wjc.137.1453462928188; Fri, 22 Jan 2016 03:42:08 -0800 (PST) Received: from i2c.ehv.shapeways.net ([109.235.38.163]) by smtp.gmail.com with ESMTPSA id ko2sm5585646wjc.9.2016.01.22.03.42.07 for (version=TLSv1/SSLv3 cipher=OTHER); Fri, 22 Jan 2016 03:42:07 -0800 (PST) Date: Fri, 22 Jan 2016 12:42:05 +0100 From: Hans Lambermont To: bug-coreutils@gnu.org Subject: owner,group and mode options are only applied to the deepest directory Message-ID: <20160122114205.GH27713@i2c.ehv.shapeways.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 22 Jan 2016 10:52:30 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 22 11:45:18 2016 Received: (at control) by debbugs.gnu.org; 22 Jan 2016 16:45:18 +0000 Received: from localhost ([127.0.0.1]:58036 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMepq-0000VQ-21 for submit@debbugs.gnu.org; Fri, 22 Jan 2016 11:45:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51071) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMepo-0000VC-6K; Fri, 22 Jan 2016 11:45:16 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 296C467C22; Fri, 22 Jan 2016 16:45:14 +0000 (UTC) Received: from [10.3.113.211] (ovpn-113-211.phx2.redhat.com [10.3.113.211]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MGjDst009991; Fri, 22 Jan 2016 11:45:13 -0500 Subject: Re: bug#22432: owner, group and mode options are only applied to the deepest directory To: Hans Lambermont , 22432-done@debbugs.gnu.org References: <20160122114205.GH27713@i2c.ehv.shapeways.net> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <56A25C99.6090304@redhat.com> Date: Fri, 22 Jan 2016 09:45:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <20160122114205.GH27713@i2c.ehv.shapeways.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="wWQIMgtCIEnuRJIcxpdwR1pgkCBKxPLDV" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --wWQIMgtCIEnuRJIcxpdwR1pgkCBKxPLDV Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable tag 22432 notabug thanks On 01/22/2016 04:42 AM, Hans Lambermont wrote: > Package: coreutils > Version: 8.21 >=20 > When 'install' creates nested directories the options for owner,group a= nd mode > are only applied to the deepest directory. Thanks for the report, but this is documented. Per 'info install': =E2=80=A2 If the =E2=80=98--directory=E2=80=99 (=E2=80=98-d=E2=80=99) = option is given, =E2=80=98install=E2=80=99 creates each DIRECTORY and any missing parent directories. Parent directories are created with mode =E2=80=98u=3Drwx,go=3Drx=E2=80=99 (755), regar= dless of the =E2=80=98-m=E2=80=99 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --wWQIMgtCIEnuRJIcxpdwR1pgkCBKxPLDV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWolyZAAoJEKeha0olJ0NqFZQH+wcLv+L+rFQj4jmTNI1M5piv PLMgpOmhC7FcPosvUUODn5vyVKlJlcbF63XgSX6PgEl5fd0qN9LKgcQ/GUZz6F7r OjJr4vWg9lqrpRZNdzxjpBurleQMg2GpcRuW0u4aQP27Hq/q5rHipg69mUiEp/S1 70rzOTaMDgjXxeGNjuhzyKmC9tt+OBv8oQOlGvWwM7kwvbZcgC4CRI2xCj1zqr4S pkKfIVYTekp937JG1SPPZyUJPoQWDdRW9sJ/jHGgGZbrUoFJ1LxklNrS+qsR0D41 sn/nLxd6rjVeCTQunIvCW4pTlahn780RKDEcbCn9yxnGsIM/hMJ/sOkh/6JCZOc= =hiAQ -----END PGP SIGNATURE----- --wWQIMgtCIEnuRJIcxpdwR1pgkCBKxPLDV-- From unknown Sat Jun 21 10:30:06 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Feb 2016 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator