chmod man page bug - clear setuid/setgid with numerical value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

There is an incorrect assertion made in the chmod man page:

Under the setuid/setgid header it says, "you can set (but not clear) the bits with a numeric mode"

This is not entirely true. If you prefix your numeric mode with a 0 then it will work:

e.g.
touch myfile
chmod 644 myfile
ls -l myfile
chmod g+s myfile
Is -l myfile
chmod 00644 myfile
is -l myfile


This simple test shows that you can clear the uid/gid bits with numeric mode which is especially useful in scripts.

An update to the man page to clarify this would be helpful. 

Thanks,
Oliver --
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux