Artificial intelligent assistant

Default umask for cron jobs How to set default umask for cron jobs, please? (On RHEL 6.) Jobs are started under non-interactive (obviously) no-login (?) shell. Not only I prefer dash over bash. But consider also bash called as `/bin/sh`. It seems, that both shells in non-interactive no-login invocation doesn't read any start-up file like `/etc/profile`. Is the default umask hard-wired in shell or it is inherited from cron daemon?

On RHEL, PAM is used, so you could try using `pam_umask`

Try putting this in `/etc/pam.d/crond`


session optional pam_umask.so umask=0022


Naturally, this is untested, and may very well break assumptions made by various applications.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy da8ca299ee0a8fa65238d105c1fdda03