chmod and chown recursion (sudo)

Smoot Carl-Mitchell smoot at tic.com
Sat Mar 5 13:06:37 UTC 2011


On Sat, 2011-03-05 at 09:14 +0000, Thufir Hawat wrote:
> How do you recursively change the owner and add read/write permissions?  
> For some reason, http://apress.com/book/downloadfile/4045 seems to have 
> odd permissions?  From time to time I seem to run across downloads like 
> this :(
> 
> Using chown recursively worked fine, but running, via sudo:
> 
> chmod +rw FaceletsEssentials/  -Rv  
> 
> didn't actually add read and write permissions (I suppose I really on 
> need read).  Is there some trick to "forcing" this command to work as 
> sudo?

The umask bits are modifying the results when you do not specify the
leading ugo flags.  I suspect root's umask is different than your own
umask.  See the man page for details.  This should work if you really
want to make the file tree readable and writable by everyone:

sudo chmod -R ugo+rw  FaceletsEssentials

-- 
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