Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .