1

If we create a shared directory, and allow say a root user and a group sharedgroup to the permissions: -rwxrwxr--, and we want every new file to have the permissions -rwxrwxr--, but the permission of the parent directory to be rwxrwxr-w. The way to do this would(what I know) be to set the default umask to 0003, but it appears once we close the terminal the umask is reset. So how do we make the change permanent only for a directory, because we wouldn't want to change the umasks of the entire system.

3
  • How are users accessing this directory? SSH into hte machine? or via a network share?
    – ivanivan
    Sep 26, 2017 at 2:10
  • It's basically a machine, that multiple users will be logged in, like a cyber cafe where the users are given a seperate account Sep 26, 2017 at 4:57
  • r-w for a directory makes little sense. You can't write to a directory if you don't have search permission as you need search permissions to anything with files in the directory. Giving execute permission to every non-directory file also makes little sense. Only files meant to be executed should have that permission. Sep 26, 2017 at 7:09

1 Answer 1

1

You cannot customize umask on a per-directory basis.

The typical way to solve your particular scenario, is to use a setfacl default mask.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .