Re: Re: sequence of chmod and chown in unrestricted chown environment

2013-07-10 Thread Vladimir Marek
> > Right. On the other hand, doing always chmod before chown on Solaris > > would also work, if I understand things correctly. > > But chown sometimes fiddles with setuid and setgid bits, and when it > does that, that would introduce a bug. That is true (unless the user has special privileges).

Re: sequence of chmod and chown in unrestricted chown environment

2013-07-10 Thread Paul Eggert
On 07/10/2013 12:54 AM, Vladimir Marek wrote: > But the chown > will be executed anyway just in a different sequence, so I don't see the > difference. The difference is that the setuid or setgid bits will be cleared by the chown, which means they'll be incorrect in the final version of the file.