chmod and chown recursion (sudo)
MR ZenWiz
mrzenwiz at gmail.com
Tue Mar 8 21:27:28 UTC 2011
On Tue, Mar 8, 2011 at 7:53 AM, Smoot Carl-Mitchell <smoot at tic.com> wrote:
> On Tue, 2011-03-08 at 00:25 -0800, MR ZenWiz wrote:
>> On Mon, Mar 7, 2011 at 7:17 PM, Smoot Carl-Mitchell <smoot at tic.com> wrote:
>> :
>> > Check the man page on chmod. The umask does effect the results. Also
>> > the ugo+rw *adds* the bits indicated and does not affect bits already
>> > set in the permission.
>> >
>> Here is what I see:
>>
>> $ umask
>> 0002
>> $ ll EmpHist.odt
>> -rw-rw-r-- 1 mar users 10589 2010-07-07 15:43 EmpHist.odt
>> $ chmod 777 EmpHist.odt
>
> The explicit octal permission bits are not affected by the umask. Nor
> are the explicit ugo "symbolic" bits. It is only when you "wildcard"
> the permission bits by not specifying the "ugo" "symbolic bits does the
> umask enter into the algorithm. e.g
>
> chmod +rw filename ...
>
> only affect the permission bits which are not masked by umask.
>
> If you go back and look at the original post, the poster was not
> explicitly calling out the permission bits.
>
Good catch. Thanks.
More information about the ubuntu-users
mailing list