Server Fault is a question and answer site for system and network administrators. 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 remember last time when I am on some Linux OS ( cannot remember ), when I change the mod of a directory to 711, that folder together with all of its sub-directories cannot be listed (ls -al) by any other user different from the owner.

However my Ubuntu 12.04 does not behave like that. Is there any setting available to set this up ?

share|improve this question

Changing the permissions of a directory to 711 will only prevent that one directory's contents from being listed. If you want the same to apply to subdirectories, you'd have to change the permissions of the subdirectories, too. Here is a command to help you:

find /dir -type d -exec chmod 711 {} +

You'd still have to do it for any newly created directories, though.

share|improve this answer

Your Answer


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.