Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
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.