Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 .

share|improve this question

1 Answer 1

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 {} \;
share|improve this answer
2  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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