1

I have Debian Squeeze server with set of users. All users must be able to work with shared files.

So what I did is to set to all of these users same main group (e.g. editors) Then put files into /home/editors/, set permissions with that folder to rwxrws---, so that group members can do anything within that folder (execute permission is also necessary). Also I set umask to maintain these default permissions using pam module. But still whenever I create any file or directory it only gets rwxr-s--- permissions.

Am I missing something?

H.-Dirk Schmitt
  • 654
  • 4
  • 9
Alexey Kamenskiy
  • 794
  • 1
  • 9
  • 23

1 Answers1

0

I suggest that your umask is false. Use umask ug=rwx,o= for your purpose.

Just for clarification see the following example:

$ umask -S
u=rwx,g=rwx,o=rx
$ touch DUMMY
$ ls -l DUMMY
-rw-rw-r-- 1 dschmi users 0 Nov 28 09:07 DUMMY
$ umask g-w
$ umask -S
u=rwx,g=rx,o=rx
$ touch DUMMY2
$ ls -l DUMMY2
-rw-r--r-- 1 dschmi users 0 Nov 28 09:08 DUMMY2
$ umask ug=rwx,o= ; mkdir DUMMY_DIR; ls -al DUMMY_DIR; rmdir DUMMY_DIR
drwxrwx---  2 dschmi users  40 Nov 28 10:46 .
H.-Dirk Schmitt
  • 654
  • 4
  • 9
  • I just tried `$ umask -S` and the result was `u=rwx,g=rwx,o=`. So umask seems to be set right, but still `$ mkdir test` produces `drwxr-s---` – Alexey Kamenskiy Nov 28 '12 at 08:33
  • I added the umask result for the directory. As you see it should work. I guess that you have another setting that interfere with the standard behavior. Is this a standard debian system or do you use acls? – H.-Dirk Schmitt Nov 28 '12 at 09:54
  • No ACLs and the system was set up by me from minimal installation containing only system itself and apt-get with dependencies and repository information. I am also surprised by this behavior, this is why I ask it here. – Alexey Kamenskiy Nov 28 '12 at 09:58
  • Another hint: Check the behavior below a different mount point (e.g. /tmp), check if a 'umask' like mount option is used. – H.-Dirk Schmitt Nov 29 '12 at 09:34