Let me try to clean this up a bit so that it looks more coherent.
To share a directory using the standard method one creates a directory:
Code:
sudo mkdir /home/Shared
Then one changes the group of the folder - in this case to plugdev:
Code:
sudo chown :plugdev /home/Shared
Then one sets permissions to set the sgid bit so that all new files "inherit" that group and allow that group to write to the directory:
Code:
sudo chmod 2775 /home/Shared
Then one adds files/folders to that directory by either creating new files or copying over old files. A move to the directory will not work it has to be a copy.
From what I can tell from your post you instead did this on an existing directory or perhaps you moved files/folders to the new directory. In this case you will need to do 2 things to correct for permissions:
A recursive chown so all entries have plugdev as group:
Code:
sudo chown -R :plugdev /home/Shared
And then recursively setting the sgid bit on all existing subdirectories - but not files using this butt ugly expression:
Code:
find /home/Shared -type d -exec chmod g+s {} \;
Just remember that this works for all new files created in and any files copied to the folder - but not with files moved to the folder. A move is not a copy-then-delete it's a change to the part of the file that specifies it's path so the sgid bit has no affect on it. If you do a lot of moving to this directory I would strongly suggest bindfs.
Also Note: The standard method does not work properly in Ubuntu 13.10 because umask is hopelessly broken. The bug was classified as "fixed released" and the bug report was for 13.10 specifically but the fix was made for 14.04 not 13.10. Will the fix be relased for 13.10? There really isn't any incentive by Ubuntu to do so but you may get lucky. Again, bindfs is my recommendation to circumvent this issue in 13.10.
Bookmarks