0

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?

Cody
  • 1
  • 1

2 Answers2

2

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 ?

user9517
  • 115,471
  • 20
  • 215
  • 297
  • 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`. –  Jul 08 '11 at 17:21
0

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