Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to share a folder for two users, here is what I did:

  • created group
  • add users to group
  • set chmod
  • set chown
  • set setgid 2775
  • reboot

After that:

  1. echo test > /Common/testfile -> group readable&writable

  2. Created file using Nautilus -> group readable, but not writable

  3. Copied file using Nautilus -> group readable, but not writable

  4. Created file using gedit -> group readable&writable

Why? Is it a bug? This was on a clean Ubuntu 10.10 installation.

share|improve this question
If the files created belong to the group common, the setgid is being respected. It seems to me you have a problem with nautilus not respecting the umask. I found an old bug ( that describes exactly this, but is apparently fixed. – Carsten Thiel Dec 21 '10 at 9:09
and how can i test it and what can i do? – Shara Dec 21 '10 at 9:54
Why would you create files using Nautilus? – poolie Apr 21 '11 at 0:06

If you want to get specific permissions for every file in folder, using ACLs is probably most robust way to do it:

chgrp YOUR_GROUP_NAME /Common
chmod g+s /Common
setfacl -d -R -m group:YOUR_GROUP_NAME:rwx /Common
setfacl -R -m group:YOUR_GROUP_NAME:rwx /Common

With ACLs filesystem permissions do not matter. Your program can set filesystem permissions (for example read only or no permissions for group).

SGID bit for folder only forces setting group name, but not permissions.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.