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?

link|improve this question
feedback

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 ?

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

Try this, it works for me: http://forums.gentoo.org/viewtopic-p-6650651.html

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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