From debbugs-submit-bounces@debbugs.gnu.org Sun Jun 26 22:30:49 2016 Received: (at submit) by debbugs.gnu.org; 27 Jun 2016 02:30:49 +0000 Received: from localhost ([127.0.0.1]:57242 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHMK1-000564-6G for submit@debbugs.gnu.org; Sun, 26 Jun 2016 22:30:49 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57156) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHKqj-0002ai-RE for submit@debbugs.gnu.org; Sun, 26 Jun 2016 20:56:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHKqd-00050x-Pk for submit@debbugs.gnu.org; Sun, 26 Jun 2016 20:56:24 -0400 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_40 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHKqd-00050f-Mp for submit@debbugs.gnu.org; Sun, 26 Jun 2016 20:56:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHKqb-00027E-Gd for bug-coreutils@gnu.org; Sun, 26 Jun 2016 20:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHKqX-0004zb-CE for bug-coreutils@gnu.org; Sun, 26 Jun 2016 20:56:20 -0400 Received: from alt23.smtp-out.videotron.ca ([70.80.0.74]:13950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHKqX-0004yu-8K for bug-coreutils@gnu.org; Sun, 26 Jun 2016 20:56:17 -0400 Received: from [192.168.1.145] ([66.131.157.108]) by Videotron with SMTP id HKqSbY17jPTiyHKqTbZOgR; Sun, 26 Jun 2016 20:56:14 -0400 X-Authority-Analysis: v=2.1 cv=L469O7n8 c=1 sm=1 tr=0 a=LOPBgFCOUZcWfWy9j8o8tA==:117 a=LOPBgFCOUZcWfWy9j8o8tA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=IkcTkHD0fZMA:10 a=xhic7CjbrdCKh8OrQLYA:9 a=QEXdDO2ut3YA:10 To: bug-coreutils@gnu.org From: westlake Subject: chmod can unset sticky bits using octet format Message-ID: <577079B8.4040205@videotron.ca> Date: Sun, 26 Jun 2016 20:56:24 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.8.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfP/901zPNRHRNz+9hVtV6CUTAamo6plaGqYzLftQ0NMLCn8hkrXgZKdHCbKzsAgfJNkfcSI4HuhUKmRsd3RGmFHyGGpw7FGMAS5ebw7hy5f6ehWxHBpk NOzcHr6pwmUaDQhtX05IkY0QRPJYGrFtP+C1vv6s6nILt0fDaJB8Aw2nzplHwNrmufFSpmNvEMxKlg== X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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: Sun, 26 Jun 2016 22:30:48 -0400 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 (----) According to chmod's manpage, "chmod preserves a directory's set-user-ID and set-group-ID bits unless you explicitly specify otherwise. You can set or clear the bits with symbolic modes like u+s and g-s, and you can set (but not clear) the bits with a numeric mode." contrary to documentation, chmod can otherwise clear sticky bits using the octet notation but by using a 5th octal commands used, mkdir abc chmod u+s,g+s abc chmod 0755 abc (no effect on the sticky bits) chmod 00755 abc (sticky bits cleared using the 5th octal position) From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 27 10:13:27 2016 Received: (at 23853) by debbugs.gnu.org; 27 Jun 2016 14:13:27 +0000 Received: from localhost ([127.0.0.1]:58392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHXHy-0003Pg-RZ for submit@debbugs.gnu.org; Mon, 27 Jun 2016 10:13:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38519) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bHXHx-0003PU-2Z for 23853@debbugs.gnu.org; Mon, 27 Jun 2016 10:13:25 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4D7C563E24; Mon, 27 Jun 2016 14:13:21 +0000 (UTC) Received: from [10.3.116.42] (ovpn-116-42.phx2.redhat.com [10.3.116.42]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5REDKsp029616; Mon, 27 Jun 2016 10:13:21 -0400 Subject: Re: bug#23853: chmod can unset sticky bits using octet format To: westlake , 23853@debbugs.gnu.org References: <577079B8.4040205@videotron.ca> From: Eric Blake Openpgp: url=http://people.redhat.com/eblake/eblake.gpg Organization: Red Hat, Inc. Message-ID: <57713480.4050108@redhat.com> Date: Mon, 27 Jun 2016 08:13:20 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <577079B8.4040205@videotron.ca> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="qPHCoea1leqaMtBlbIPIEEhbMcPwqgjna" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 27 Jun 2016 14:13:21 +0000 (UTC) X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: 23853 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: -6.3 (------) This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --qPHCoea1leqaMtBlbIPIEEhbMcPwqgjna Content-Type: multipart/mixed; boundary="FxJVSn2Rn3KuBSP1xIVoslAUqXgSIW9kk" From: Eric Blake To: westlake , 23853@debbugs.gnu.org Message-ID: <57713480.4050108@redhat.com> Subject: Re: bug#23853: chmod can unset sticky bits using octet format References: <577079B8.4040205@videotron.ca> In-Reply-To: <577079B8.4040205@videotron.ca> --FxJVSn2Rn3KuBSP1xIVoslAUqXgSIW9kk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 06/26/2016 06:56 PM, westlake wrote: > According to chmod's manpage, > "chmod preserves a directory's set-user-ID and set-group-ID bits unless= > you explicitly specify otherwise. You can set or clear the bits with > symbolic modes like u+s and g-s, and you can set (but not clear) the > bits with a numeric mode." >=20 > contrary to documentation, chmod can otherwise clear sticky bits using > the octet notation but by using a 5th octal >=20 > commands used, > mkdir abc > chmod u+s,g+s abc > chmod 0755 abc (no effect on the sticky bits) > chmod 00755 abc (sticky bits cleared using the 5th octal position) The behavior of the 5th octal to intentionally specify that the otherwise leading 0 is intended to clear sticky bits is intentional, so the only bug here is in the documentation for not making the intended behavior more obvious. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --FxJVSn2Rn3KuBSP1xIVoslAUqXgSIW9kk-- --qPHCoea1leqaMtBlbIPIEEhbMcPwqgjna 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/ iQEcBAEBCAAGBQJXcTSAAAoJEKeha0olJ0Nqqc0H/1/achBudrUWtzqpKH/JoTiY F+4gsGUV0Yg0Lfv/D1Q4vZ1fEfbaOJ/4a+1f7dSdzpDoVOvEtsK7fI0JTeNUBH6n i1Jwa5deVxngMfKrHa9tZlo/oWOnmKYdZezoUPCF4g0fVXSrl1EdGwClduRNt+Mu DF8P+JTp4/rC7TJ4+QKLP0ppCKREIJtiKV9qu6N6B4oTCipA/ZsQB4dncZMSw9W8 ITZ/cgig2WPc6q/EzsiEV/yqmlM4LsYkxQ8tU7OfT/wzbMc9W4/aPorRlO5tbxiw pAeZ4+A85K+c91AttWBPaW2hgIrpO8c5qAE5WM6nZcXw9t1jl+P5E2Fi80vlA3s= =Qe1R -----END PGP SIGNATURE----- --qPHCoea1leqaMtBlbIPIEEhbMcPwqgjna-- From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 28 02:14:47 2018 Received: (at 23853) by debbugs.gnu.org; 28 Oct 2018 06:14:47 +0000 Received: from localhost ([127.0.0.1]:46213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGeLX-00026X-Da for submit@debbugs.gnu.org; Sun, 28 Oct 2018 02:14:47 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:39580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gGeLT-000267-UN; Sun, 28 Oct 2018 02:14:44 -0400 Received: by mail-pf1-f193.google.com with SMTP id c25-v6so2449267pfe.6; Sat, 27 Oct 2018 23:14:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=qXfwql2D8nE0yJKD4Sha9lF3B4MFX96AK3gJpWvgzu4=; b=pyEa4d4Jf8ACOQoNdyOzZaSkqBsFfBUduRAkX8F/MA5+UgTiPKTHqfUZjUqKe2Mj6x JdeWL7sSyEmYHUNdUgHqXeum5Zo8iPXtnXkFgJK451q4P5MwT0rgX0zo9Xm01sJ1+DHG fY8YDac58z5r82g+GUeyZVMrr8/LYhz4W4TkpChEbEWW+IVd8mLIEmbrAsTd5zR38HNW l7e5j/pOEPEmTnti6/D8pY3hAPvgRQo8H2MgVXArQAYlM5nAL2Cw0N/hZG5r3AxVpice bQIwt/DarutXuI8vucaSAWJiMnd3D+94X2yOfrQoLaGK0n22PrE+3bw3l8Ggm8N0ERIB 1Tng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=qXfwql2D8nE0yJKD4Sha9lF3B4MFX96AK3gJpWvgzu4=; b=KIUfbQJHekfzYjuEVR1z8TnGKQpwS8rR0nLIRNiJ39L4bb1/kP5HQJmkZ86esfn81w I4bT4b+0Vmhk2xLSe+RVe/u0jYwCGdEhUQyeRHAq3IDski2tgsux7ISBpv3cu5YrJpEx 0ShKT5Z7QFrZ6YwQjq51q5lHjabe/azGlFCfHgooFQhQo4QeeHpZJaF7atBy1zSNubut BJlnQMFtPu/RRVbuiJMbfQlBCcUTGQB9HugTOcVKomPcI4N0zGNZrJK4ZqDqjsHhqEPB CE3KfgadjwIEft129MnlSwh+p67Kauy/E+v+m/V/rAX4TaXnJruOLHhixu6aFa5xCzoY tbbQ== X-Gm-Message-State: AGRZ1gJPa+wj6ffmpWulPO/287aNYmXxXH4dAGS7sDBx2ipJGSuCArYu N2rfSTJzdGsjGWrdb7RZOG60DFaNhBM= X-Google-Smtp-Source: AJdET5fg1DeCq2Dq2giJ7p5eWcazoeZKbtXKGUaFbCWYk2ksDWq+uH8icNZwKoCxZ2JGAxD6XAI3Tw== X-Received: by 2002:a63:f111:: with SMTP id f17mr9282229pgi.236.1540707276148; Sat, 27 Oct 2018 23:14:36 -0700 (PDT) Received: from tomato.housegordon.com (moose.housegordon.com. [184.68.105.38]) by smtp.googlemail.com with ESMTPSA id d29-v6sm16925826pgm.56.2018.10.27.23.14.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 27 Oct 2018 23:14:34 -0700 (PDT) Subject: Re: bug#23853: chmod can unset sticky bits using octet format To: 23853@debbugs.gnu.org References: <577079B8.4040205@videotron.ca> <57713480.4050108@redhat.com> From: Assaf Gordon Message-ID: <45059688-75c3-5d46-deae-fa54c038c559@gmail.com> Date: Sun, 28 Oct 2018 00:14:33 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <57713480.4050108@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 23853 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: -1.0 (-) close 23853 stop (triaging old bugs) On 2016-06-27 8:13 a.m., Eric Blake wrote: > On 06/26/2016 06:56 PM, westlake wrote: >> >> contrary to documentation, chmod can otherwise clear sticky bits using >> the octet notation but by using a 5th octal [...] > The behavior of the 5th octal to intentionally specify that the > otherwise leading 0 is intended to clear sticky bits is intentional, so > the only bug here is in the documentation for not making the intended > behavior more obvious. With no further comments in 2 years, I'm closing this bug. Discussion can continue by replying to this thread. -assaf From unknown Tue Jun 17 01:35:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 25 Nov 2018 12:24:09 +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