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

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

 



On 11/20/2017 07:55 PM, Ol Isaac wrote:
> 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.

Hi Oliver,

This page is from a different project. Please see
http://man7.org/linux/man-pages/man1/chmod.1.html#COLOPHON
for info on reporting bugs there.

Cheers,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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