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.

  • 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

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.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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