I'm under linux . by default, other user can't read anything under my home directory . let's see my home directory is /home/superman , and I tried to use

chmod +r /home/superman

to let others can acess files under my home directory , but it does not work .

link|improve this question

33% accept rate
feedback

1 Answer

up vote 2 down vote accepted

Use the -R switch to modify permissions recursively:

chmod +r /home/superman -R

but of course this is of no use if they can't go into deeper directories, so you may want to also give execute access to directories for the other users. This may not be necessary depending on your current umask value though:

find /home/superman -type d -exec chmod +x {} \;

If you'd only like them to be able to read stuff in your home directory, and no further:

find /home/superman -maxdepth 1 -type f -exec chmod +r {} \;
link|improve this answer
1  
Instead of the first find, you can usually use chmod -R +rX /home/superman - it will add +x for directories only. – grawity Jan 18 '10 at 16:25
@grawity Thanks! totally forgot about that. I'm just so used to find since I use it for everything. – John T Jan 18 '10 at 17:05
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.