On 02/10/2013 11:31 AM, Alexey Potehin wrote: > Hello people! > > This is path for strange behavior: > > rm -rf chmodbug; > mkdir chmodbug; > chmod 2755 chmodbug; > stat --print "%a %n\n" chmodbug; > chmod 0755 chmodbug; > stat --print "%a %n\n" chmodbug;
This behavior is documented. We _intentionally_ leave the sticky bit alone, unless you request a double-leading 0 as declaration that you are aware of the consequences of clearing the sticky bit. Our behavior is compliant with POSIX, and we will not be changing it. chmod 00755 chmodbug stat --print "%a %n\n" chmodbug -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
