Output File Permissions Not Set Correctly on Linux

Hello everyone,

I’m trying to have deadline slaves create output files following the umask set for the users that the jobs render as so that files can be written over by anyone in the same group umask=002.

The current Repository settings has “Render Jobs as User” checked and is using sudo.
Users have their umask set in a /etc/profile.d/umask.sh script which works when I test it:

[root@machine ~]# sudo --login --user=alice
[alice@machine ~]$ umask
0002

It also works when I log in using su:

[root@machine ~]# su -l alice
[alice@machine ~]$ umask
0002

The deadline slave runs as the root user to be able to render as different users.

However the output files are coming out with 644 file permissions instead of 664.

Any ideas how to get this to work? Should I set umask values somewhere else than /etc/profile.d?

Thank you!
Beat

The closest related topic I found was this but it is for Windows and doesn’t have information that helps: User permissions on output files

1 Like

If I remember right you need to have ‘Use su instead of sudo on Linux’ checked off and ‘Simulate Login’ to have profile.d get run by Deadline since only su has the option to simulate a login.

I don’t have a *nix machine handy to double check, but if you make those changes and restart the Worker to force it to take up the changes it should be happy. Based on the code the ‘Simulate Login’ option is what adds -l to the su call like in your test.

Thank you Justin,
that makes total sense, only su has a “Simulate Login” and sudo doesn’t. I should have noticed that, appreciate the help!

1 Like