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.

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.

share|improve this question
3  
Just 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. –  Zoredache Dec 12 '12 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. –  winteck Dec 12 '12 at 21:01

1 Answer 1

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.

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.