GNU/Linux permissions problem

JeevesBond's picture

He has: 3,955 posts

Joined: Jun 2002

How would you go about setting up file/directory permissions in GNU/Linux for the following scenario?

  1. a shared working directory, we'll call it: working_directory;
  2. multiple users, all belonging to the same group, which we'll call admin;
  3. all members of the admin group should have full access to create/read/edit/delete files in the working_directory, including those created by other users;
  4. working_directory has permissions of 775 and the GUID bit set;
  5. umask is set to 022 (so default file permissions are 644) and I'm unsure about changing it to 002. This would make what I want possible, but would change the setting for the whole system, which worries me a little;
  6. no acl software package installed, but if other people have had success with this and it's not a pain to setup, then please do suggest it;

a Padded Cell our articles site!

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

Could you setup a mount point in fstab and change the umask in the options column?

EDIT: Now I don't think it's possible to mount a directory to another directory. Maybe you could use a big flash drive, or create a separate partition for that.

JeevesBond's picture

He has: 3,955 posts

Joined: Jun 2002

Thanks for the advice, I've been investigating a bit further.

EDIT: Now I don't think it's possible to mount a directory to another directory.

It is possible, you can use mount --bind /home/dave/working_directory /working_directory, for example. There's also mount -o remount,<some_other_options> /working_directory, to remount a filesystem with different options.

This is all cool stuff, which I didn't know before, but only a few file systems allow the umask option and EXT3 isn't one of them (which is the filesystem I have to use). Plain

EXT3 does support acl lists though, that might be the easiest way around this. Thanks for the help! Smiling

a Padded Cell our articles site!

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

One trick I've used to set umask for operations under a particular directory is to mount it with sshfs -oumask=002. Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.