New answers tagged umask
A umask value of 001 says that it is preventing the creation of files with other executable permissions. (Actually not preventing the creation, as preventing the executable-permissions). A 666 mode in an open statement only permits user+group+other for read and write permissions. So the umask has no effect on that. However umask does not affect chmod.
Instead changing the umask you could use the usergroups option for pam_umask, with this user and group has the same permissions, as the classical unix way to share folders. # /etc/pam.d/login or # /etc/pam.d/common-session or system-auth session optional pam_umask.so usergroups
To set default umask system-wide you will have to enable it in first place, which pretty well explained here: http://manpages.debian.org/cgi-bin/man.cgi?query=pam_umask&sektion=8 The above link is for debian and ubuntu but the same for all other linux systems. To enable it umask (which maybe already in place) you need to add a line to ...
The permission of a new file is computed from the permission used with the creat() call. You umask results in: $ umask 002 $ umask -S u=rwx,g=rwx,o=rx So if you use creat() with a file permission of 0777, you will get a new file with rwxrwxrx. Usual programs however use 0666as file permission argument for creat().
This is not possible. umask only prevents permissions but never adds them. Thus you get execute permission only if the creating open() syscall does contain them. This is the case if a compiler creates an executable file.
Top 50 recent answers are included