From unknown Fri Aug 15 16:19:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#7708 <7708@debbugs.gnu.org> To: bug#7708 <7708@debbugs.gnu.org> Subject: Status: cp: Solaris 11 ACL-related problem Reply-To: bug#7708 <7708@debbugs.gnu.org> Date: Fri, 15 Aug 2025 23:19:53 +0000 retitle 7708 cp: Solaris 11 ACL-related problem reassign 7708 coreutils submitter 7708 Jim Meyering severity 7708 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 22 07:23:12 2010 Received: (at submit) by debbugs.gnu.org; 22 Dec 2010 12:23:12 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PVNim-0007uj-Kx for submit@debbugs.gnu.org; Wed, 22 Dec 2010 07:23:12 -0500 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PVNik-0007uJ-LP for submit@debbugs.gnu.org; Wed, 22 Dec 2010 07:23:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVNoi-0004iA-9t for submit@debbugs.gnu.org; Wed, 22 Dec 2010 07:29:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([199.232.76.165]:54775) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVNoi-0004i4-6m for submit@debbugs.gnu.org; Wed, 22 Dec 2010 07:29:16 -0500 Received: from [140.186.70.92] (port=39736 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PVNoM-0001I9-I4 for bug-coreutils@gnu.org; Wed, 22 Dec 2010 07:29:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PVNo5-0004KK-22 for bug-coreutils@gnu.org; Wed, 22 Dec 2010 07:28:54 -0500 Received: from mx.meyering.net ([82.230.74.64]:52389) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PVNo4-0004JL-LI for bug-coreutils@gnu.org; Wed, 22 Dec 2010 07:28:37 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id DB16E60490; Wed, 22 Dec 2010 13:28:34 +0100 (CET) From: Jim Meyering To: bug-coreutils@gnu.org Subject: cp: Solaris 11 ACL-related problem Date: Wed, 22 Dec 2010 13:28:34 +0100 Message-ID: <8762umvvnx.fsf@meyering.net> Lines: 107 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) The cp/fail-perm test failed like this on solaris 5.11: ... cleanup_ + : + cd /w/coreutils-8.7.78-628a6/tests + chmod -R u+rwx /w/coreutils-8.7.78-628a6/tests/gt-fail-perm.0bni + rm -rf /w/coreutils-8.7.78-628a6/tests/gt-fail-perm.0bni rm: cannot remove `/w/coreutils-8.7.78-628a6/tests/gt-fail-perm.0bni/DD/D': Permission denied + test 0 = 0 + __st=1 + exit 1 To see what's going on, I had to use the vendor ls's -v (show ACL) option: $ /bin/ls -dv DD drwxrwxrwx+ 3 meyering meyering 3 Dec 22 02:48 DD 0:owner@:read_attributes/write_attributes/read_acl/write_acl/synchronize :allow 1:owner@:delete_child:deny 2:group@:delete_child/write_attributes/write_acl:deny 3:group@:read_attributes/read_acl/synchronize:allow 4:group@:delete_child/write_attributes/write_acl:deny 5:everyone@:read_attributes/read_acl/synchronize:allow 6:everyone@:delete_child/write_attributes/write_acl:deny 7:owner@::deny 8:owner@:list_directory/read_data/add_file/write_data/add_subdirectory /append_data/write_xattr/execute/write_attributes/write_acl /write_owner:allow 9:group@::deny 10:group@:list_directory/read_data/add_file/write_data/add_subdirectory /append_data/execute:allow 11:everyone@:write_xattr/write_attributes/write_acl/write_owner:deny 12:everyone@:list_directory/read_data/add_file/write_data /add_subdirectory/append_data/read_xattr/execute/read_attributes /read_acl/synchronize:allow The culprit is the #1 rule; it denies owner dirent removal: 1:owner@:delete_child:deny Here's how that directory created: chmod g-s . || framework_failure mkdir D D/D || framework_failure touch D/a || framework_failure chmod 0 D/a || framework_failure chmod u=rx,go=,-st D || framework_failure # This is expected to exit non-zero, because it can't read D/a. cp -pR D DD > /dev/null 2>&1 && fail=1 The quick work-around is to remove all ACLs from ".": /bin/chmod -R A- . But obviously we should not have to resort to that in a test script. Here's a small reproducer that should be made into its own test: (the currently failing test does catch it, but it's almost by accident) $ mkdir -p D/D; chmod u=rx D; cp -pR D DD $ chmod -R 700 DD; rm -rf DD rm: cannot remove `DD/D': Permission denied [Exit 1] Here's truss output from the above cp command: mkdir("DD/D", 0700) = 0 lstat64("DD/D", 0x08047500) = 0 openat(AT_FDCWD, "D/D", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3 fcntl(3, F_SETFD, 0x00000001) = 0 fstat64(3, 0x080471B0) = 0 getdents64(3, 0xCE9F4000, 8192) = 48 getdents64(3, 0xCE9F4000, 8192) = 0 close(3) = 0 utimensat(AT_FDCWD, "DD/D", 0x08047320, 0) = 0 lchown("DD/D", 14263, 14263) = 0 pathconf("D/D", _PC_ACL_ENABLED) = 2 acl("D/D", ACE_GETACLCNT, 0, 0x00000000) = 6 stat64("D/D", 0x08047220) = 0 acl("D/D", ACE_GETACL, 6, 0x0807FA00) = 6 stat64("DD/D", 0x080471C0) = 0 pathconf("DD/D", _PC_ACL_ENABLED) = 2 acl("DD/D", ACE_SETACL, 7, 0x0807FA70) = 0 utimensat(AT_FDCWD, "DD", 0x080476A0, 0) = 0 lchown("DD", 14263, 14263) = 0 pathconf("D", _PC_ACL_ENABLED) = 2 acl("D", ACE_GETACLCNT, 0, 0x00000000) = 6 stat64("D", 0x080475A0) = 0 acl("D", ACE_GETACL, 6, 0x0807EFF0) = 6 stat64("DD", 0x08047540) = 0 pathconf("DD", _PC_ACL_ENABLED) = 2 acl("DD", ACE_SETACL, 7, 0x0807F060) = 0 llseek(0, 0, SEEK_CUR) = 1314515 close(0) = 0 close(1) = 0 close(2) = 0 _exit(0) For the record, uname -a reports this: SunOS xxx 5.11 snv_134 i86pc i386 i86pc Solaris I'm inclined to defer any fix until after the imminent release. From debbugs-submit-bounces@debbugs.gnu.org Wed Dec 22 08:11:42 2010 Received: (at 7708) by debbugs.gnu.org; 22 Dec 2010 13:11:42 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PVOTl-0001Ed-2a for submit@debbugs.gnu.org; Wed, 22 Dec 2010 08:11:42 -0500 Received: from mx.meyering.net ([82.230.74.64]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PVOTi-0001EQ-7X for 7708@debbugs.gnu.org; Wed, 22 Dec 2010 08:11:39 -0500 Received: by rho.meyering.net (Acme Bit-Twister, from userid 1000) id 01C9B60490; Wed, 22 Dec 2010 14:18:11 +0100 (CET) From: Jim Meyering To: 7708@debbugs.gnu.org Subject: Re: bug#7708: cp: Solaris 11 ACL-related problem In-Reply-To: <8762umvvnx.fsf@meyering.net> (Jim Meyering's message of "Wed, 22 Dec 2010 13:28:34 +0100") References: <8762umvvnx.fsf@meyering.net> Date: Wed, 22 Dec 2010 14:18:11 +0100 Message-ID: <87vd2muess.fsf@meyering.net> Lines: 49 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -5.7 (-----) X-Debbugs-Envelope-To: 7708 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.7 (-----) Jim Meyering wrote: ... > Here's a small reproducer that should be made into its own test: > (the currently failing test does catch it, but it's almost by accident) > > $ mkdir -p D/D; chmod u=rx D; cp -pR D DD > $ chmod -R 700 DD; rm -rf DD > rm: cannot remove `DD/D': Permission denied > [Exit 1] > > Here's truss output from the above cp command: > > mkdir("DD/D", 0700) = 0 > lstat64("DD/D", 0x08047500) = 0 > openat(AT_FDCWD, "D/D", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3 > fcntl(3, F_SETFD, 0x00000001) = 0 > fstat64(3, 0x080471B0) = 0 > getdents64(3, 0xCE9F4000, 8192) = 48 > getdents64(3, 0xCE9F4000, 8192) = 0 > close(3) = 0 > utimensat(AT_FDCWD, "DD/D", 0x08047320, 0) = 0 > lchown("DD/D", 14263, 14263) = 0 > pathconf("D/D", _PC_ACL_ENABLED) = 2 > acl("D/D", ACE_GETACLCNT, 0, 0x00000000) = 6 > stat64("D/D", 0x08047220) = 0 > acl("D/D", ACE_GETACL, 6, 0x0807FA00) = 6 > stat64("DD/D", 0x080471C0) = 0 > pathconf("DD/D", _PC_ACL_ENABLED) = 2 > acl("DD/D", ACE_SETACL, 7, 0x0807FA70) = 0 > utimensat(AT_FDCWD, "DD", 0x080476A0, 0) = 0 > lchown("DD", 14263, 14263) = 0 > pathconf("D", _PC_ACL_ENABLED) = 2 > acl("D", ACE_GETACLCNT, 0, 0x00000000) = 6 > stat64("D", 0x080475A0) = 0 > acl("D", ACE_GETACL, 6, 0x0807EFF0) = 6 > stat64("DD", 0x08047540) = 0 > pathconf("DD", _PC_ACL_ENABLED) = 2 > acl("DD", ACE_SETACL, 7, 0x0807F060) = 0 > llseek(0, 0, SEEK_CUR) = 1314515 > close(0) = 0 > close(1) = 0 > close(2) = 0 > _exit(0) > > For the record, uname -a reports this: > SunOS xxx 5.11 snv_134 i86pc i386 i86pc Solaris I omitted an important detail: file system type: It is ZFS. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 13 11:21:46 2011 Received: (at 7708-done) by debbugs.gnu.org; 13 Sep 2011 15:21:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3Unw-0006jN-TQ for submit@debbugs.gnu.org; Tue, 13 Sep 2011 11:21:46 -0400 Received: from mx1.redhat.com ([209.132.183.28]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1R3Unj-0006iz-6g for 7708-done@debbugs.gnu.org; Tue, 13 Sep 2011 11:21:32 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p8DFH3ke018054 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for <7708-done@debbugs.gnu.org>; Tue, 13 Sep 2011 11:17:03 -0400 Received: from mx.meyering.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p8DFH1ck005546 for <7708-done@debbugs.gnu.org>; Tue, 13 Sep 2011 11:17:02 -0400 Received: from rho.meyering.net (localhost.localdomain [127.0.0.1]) by rho.meyering.net (Acme Bit-Twister) with ESMTP id 8AA6E6004E for <7708-done@debbugs.gnu.org>; Tue, 13 Sep 2011 17:17:01 +0200 (CEST) From: Jim Meyering To: 7708-done@debbugs.gnu.org Subject: Re: bug#7708: cp: Solaris 11 ACL-related problem In-Reply-To: <87vd2muess.fsf@meyering.net> (Jim Meyering's message of "Wed, 22 Dec 2010 14:18:11 +0100") References: <8762umvvnx.fsf@meyering.net> <87vd2muess.fsf@meyering.net> Date: Tue, 13 Sep 2011 17:17:01 +0200 Message-ID: <87mxe8zd3m.fsf@rho.meyering.net> Lines: 9 MIME-Version: 1.0 Content-Type: text/plain X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-Spam-Score: -10.5 (----------) X-Debbugs-Envelope-To: 7708-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -10.5 (----------) Jim Meyering wrote: > Jim Meyering wrote: > ... >> Here's a small reproducer that should be made into its own test: >> (the currently failing test does catch it, but it's almost by accident) ... Closing this. Thanks to Bruno's work in gnulib, the problem is solved. From unknown Fri Aug 15 16:19:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 12 Oct 2011 11: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