GNU bug report logs - #23853
chmod can unset sticky bits using octet format

Previous Next

Package: coreutils;

Reported by: westlake <westlake2012 <at> videotron.ca>

Date: Mon, 27 Jun 2016 02:31:02 UTC

Severity: normal

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: westlake <westlake2012 <at> videotron.ca>
To: 23853 <at> debbugs.gnu.org
Subject: bug#23853: chmod can unset sticky bits using octet format
Date: Sun, 26 Jun 2016 20:56:24 -0400
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)






This bug report was last modified 6 years and 205 days ago.

Previous Next


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