bug-gzip
[Top][All Lists]
Advanced

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

Re: sequence of chmod and chown in unrestricted chown environment


From: Paul Eggert
Subject: Re: sequence of chmod and chown in unrestricted chown environment
Date: Wed, 10 Jul 2013 00:56:49 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7

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.  If you execute the chmod after the chown, it doesn't
matter that the chown clears those bits, since the chmod fixes that.



reply via email to

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