New answers tagged umask
This seems to have been overlooked: Defaults umask_override which does what was asked (see the sudoers manpage): umask_override If set, sudo will set the umask as specified by sudoers without modification. This makes it possible to specify a more permissive umask in sudoers than the user's own umask and matches historical behavior. If umask_override ...
No - that would be doable only if the applications requested the same permissions for both directories and files. But fopen uses 0666 for files, and direct open calls commonly use the same permissions, while directories require execute privilege to be useful, so they are usually requested with 0777 (or 0755, depending on the application).
In most systems, the disc files' default privilege before the umask is applied is the same as regular files. (0666)
Top 50 recent answers are included