How to set umask for a specific user, globally?

Discussion in 'all things UNIX' started by Gullible Jones, May 27, 2012.

Thread Status:
Not open for further replies.
  1. I've set up a DAC sandbox for Firefox - just an extra limited user account, in its own group (and no other groups). I'd like to be able to create and delete files in the sandbox user's home, i.e. permissions o=rw. But I would like to do that on a global basis - from /etc/profile or such, not from the user's home directory. Furthermore I would like to make the sandbox user unable to change its own umask.

    Is this possible?
  2. Mrkvonic

    Mrkvonic Linux Systems Expert

    May 9, 2005
    umask is a shell builtin, so the only way to impose this, either through mount options or filesystem options, but depends what filesystem you're using. Note this could break things.
  3. I was afraid that would be the answer. Thanks though... I guess I'll just use the .profile method, and remember to 'su -' instead of 'su'.

    (BTW is it just me or should 'su -' really be the default? I'm pretty sure there are problems with elevating to root while preserving the user's environment variables.)
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.