setperms on linux
Kenneth Brody
kenbrody at bestweb.net
Wed Apr 12 15:53:11 PDT 2006
Quoting Brian K. White (Wed, 12 Apr 2006 18:23:31 -0400):
[...]
> Both the stock setperms and my improved copy have pairs of chmod & chown
> commands in the order of chmod, then chown.
>
> Some genius has changed something somewhere such that chown now wipes
> off the suid bit!
> I reversed the order so that it's always chown then chmod and now the
> files are left with the right perms.
>
> Is it just me or is it just plain inexcusably broken for chown to even
> _touch_ the chmod bits??
[...]
I vaguely remember this from many years ago as a security issue. On
some systems, chown is allowed to change an ownership from the current
uid to something else. (Though I think chown is now executable only
by root, eliminating this problem.) Imagine creating an executable,
setting the setuid bit, and then chown root'ing it.
However, if only root can chown a file nowadays, the setuid-bit removal
may be overkill.
I've passed this bit of info along to TPTB, noting that the install
should be updated with the swapped chown/chmod.
--
KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com
More information about the Filepro-list
mailing list