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 wish to have something in my .bashrc that will mask the file permissions as 022 (resulting in new files having permission rwxr--r--) and the directory permissions as 066 (resulting in new directories having permission rwx--x--x).

Is this possible?

share|improve this question
add comment

2 Answers

You can't do that. Having a directory with just x allows others (with suitable permissions) to run programs within the directory but not list the contents of it. What are you trying to achieve ?

share|improve this answer
    
Not actually quite correct -- execute permissions on a directory allow access to its contents. A directory set 711 will allow users to enter the directory and view files if they know the name, but won't allow ls. –  duskwuff Jul 8 '11 at 17:21
add comment

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.