bug-fileutils
[Top][All Lists]
Advanced

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

Re: Bug in chgrp (GNU fileutils) 4.0p


From: Bob Proulx
Subject: Re: Bug in chgrp (GNU fileutils) 4.0p
Date: Fri, 1 Dec 2000 19:50:59 -0700 (MST)

> I have found a bug in chgrp (GNU fileutils) 4.0p.
> 
> When changing the group of a file that is has the suid bit set, it removes
> the suid bit when changing the group.
> 
> Example:
> 
> # ls -l wrapper
> -rwsrwxr-x    1 root     users       15035 Dec  1 13:24 wrapper
>    ^ suid bit is set
> 
> # chgrp majordom wrapper
> 
> # ls -l wrapper
> -rwxrwxr-x    1 root     majordom    15035 Dec  1 13:24 wrapper
>    ^ suid bit was removed
> 
> This is clearly a bug as chgrp should only be modifying the group of a
> file and not touching the permissions.

Thank you for your report.  Unfortunately the standards do not agree
with you and require that behavior.  Check out the online standards
documentation at:

http://www.opengroup.org/onlinepubs/007908799/xcu/chgrp.html

    Unless chgrp is invoked by a process with appropriate privileges,
    the set-user-ID and set-group-ID bits of a regular file will be
    cleared upon successful completion; the set-user-ID and
    set-group-ID bits of other file types may be cleared.

Also, I tested HP-UX and AIX which behaved identically.

Bob



reply via email to

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