Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making new files automatically executable?

Tags:

file

unix

umask

Is it possible to make all newly created files have the execute permission when they are created? Why can't I grant it by default?

like image 206
Jurgen Malinao Avatar asked Mar 24 '13 14:03

Jurgen Malinao


1 Answers

umask for files is subtracted from 666 and for directories it is subtracted from 777. So if your umask is 002 and you create a directory, you get 775 (777 - 002), and if you create a file you get 664 (666 - 002).

like image 116
bullsear Avatar answered Oct 03 '22 14:10

bullsear