My linux system default file permission is 666 with a umask of 0. It is 664 with a umask of 0002 and it is 644 with a umask of 022. How do i force newly created file to have a 775 permissions? Also how do I change the linux default file permission of linux box from 666 to something else like a 755? I am running a debian based system.
-
3Just out of curiosity, why would you want this? This would result a huge possibility for security problems. Making files executable by default is going to be very dangerous.– ZoredacheDec 12, 2012 at 20:55
-
I understand the ramification of such setting but i would like to know if it is possible to change it. If it is not allowed i can undestand why. Now the question is : is there a way to change it yes or no? Thanks for the quick response.– winteckDec 12, 2012 at 21:01
Add a comment
|
1 Answer
umask
doesn't turn on bits, it only turns them off. If the application you use to create the file or directory doesn't try to create with the executable bit set (for instance, gcc
or mkdir
), nothing you do with umask
will add an executable bit.