bug-coreutils
[Top][All Lists]
Advanced

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

bug#8391: chmod setuid & setguid bits


From: Eric Blake
Subject: bug#8391: chmod setuid & setguid bits
Date: Thu, 31 Mar 2011 15:07:03 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.9

On 03/31/2011 02:15 PM, Eric Blake wrote:
> I also don't know how many of the implementations are technically right
> - POSIX allows a wide range of acceptable behavior, but did require that
> the particular behavior used be documented (not like anyone wants to
> read documentation for multiple implementations to compare them to see
> where things will go different).  But if other implementations don't
> document what they do, then they are wrong no matter how you look at it,
> even if they can justify their behavior under a typical work flow.

Also note that there is a difference between POSIX requirements:

chmod 755 file - must clear setgid bit
chmod 2755 file - must set setgid bit
chmod 755 dir - may leave setgid bit set
chmod 2755 dir - may leave setgid bit clear

because POSIX is explicit that regular files treat the octal argument
literally for all 12 bits, but that all other file types are
implementation-defined on the effect on the top 3 bits.

-- 
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]