Making new files automatically executable?

Jurgen Malinao picture Jurgen Malinao · Mar 24, 2013 · Viewed 11.7k times · Source

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?

Answer

bullsear picture bullsear · Nov 27, 2013

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).