View previous topic :: View next topic |
Author |
Message |
saturnalia0 Tux's lil' helper
Joined: 13 Oct 2016 Posts: 134
|
Posted: Thu Oct 13, 2016 5:54 pm Post subject: [SOLVED] Setting per-user umask for user without a shell? |
|
|
I set up a sandbox user for Firefox following the guide from the wiki:
https://wiki.gentoo.org/wiki/Simple_sandbox
I want to change the umask for this user only, such that new files/dirs created by the sandbox user have group write permissions (for my normal user to be able to delete files created by the sandbox user). However, the sandbox user has no shell, so I can't do it on /home/ff/.bashrc or something like that, and /etc/login.defs or /etc/pam.d/login affects *all* users, whereas I just want to change the umask for the sandbox user. How could I do this?
Last edited by saturnalia0 on Fri Oct 14, 2016 2:02 am; edited 1 time in total |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21602
|
Posted: Fri Oct 14, 2016 1:43 am Post subject: |
|
|
Users do not have umasks. Processes have umasks. The simplest way to achieve your goal would be to use a wrapper script that sets the desired umask, then does exec /usr/bin/firefox "$@". Then run that script instead of running Firefox directly. |
|
Back to top |
|
|
saturnalia0 Tux's lil' helper
Joined: 13 Oct 2016 Posts: 134
|
Posted: Wed Oct 26, 2016 6:29 am Post subject: |
|
|
Thanks. I read some manuals and now I understand how it works. I ended up setting it on `/etc/sudoers.d/ff` since I only use `sudo` for that:
Code: |
me ALL=(ff) NOPASSWD: ALL
Defaults:me umask_override
Defaults:me umask=007
|
|
|
Back to top |
|
|
|