chmod and chown recursion (sudo)
Smoot Carl-Mitchell
smoot at tic.com
Tue Mar 8 15:53:14 UTC 2011
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.
--
Smoot Carl-Mitchell
System/Network Architect
voice: +1 480 922-7313
cell: +1 602 421-9005
smoot at tic.com
More information about the ubuntu-users
mailing list