No, the folders on /home are private to the individual users. You can even share the same /home partition between distributions, but you should have separate, distinct usernames to prevent problems where one distribution does not track the same application versions as another distribution.
The shared folder in /home (that is not a separate partition) could be shared between users, but you would have to manually add users to the group which owns the folder, and probably have to chmod the permissions to allow anyone other than the original owner to have more than read-only permissions in the folder.
I have already done that using a guide one of the other members posted. There will never be any more users on this machine so I am confident this setup will work, but I have a query in relation to this setup.
If I copy a folder from my own personal home folder, into the shared folder it keeps the previous group permissions. Is there anyway I can configure the system so that any file or folder that is moved into the shared directory inherits the shared groups permissions, rather than retaining the ones that it belonged to in the previous directory?
That should have been taken care of by the "chmod 2775 ... " or the "chmod 3775 ... " commands.
It hasn't turned out this way for me i'm afraid. I used "chmod 2775" as I want all users to have R/W access to the shared folder. But when I transferred all of the files from my home folder, to the shared folder, they were still being flagged as belonging to the group "iain" which is my user name. I have the "iain" group setup so that none of the other users can view the contents of my home directory as I was surprised that Ubuntu allowed this by default.
So once I had moved all of the files from my home directory, to the shared directory, I had to manually change the group the files belonged to, to the "family" group. It's a little inconvenient for me but I could plod along in this fashion but the other 2 users(my wife and daughter)would find this difficult so I was hoping that by transferring files from a users home folder to the shared folder, the files in question would automatically be transferred to the "family" group.
Last edited by idonald; August 20th, 2012 at 11:41 AM.
First, Post #12 starting to look better to you now?
Anyway, could you please explain this comment:
And could you post the ownership and permissions of the directory you set up to be shared. If I read you posts correctly it's something like /home/shared:I have the "iain" group setup so that none of the other users can view the contents of my home directory as I was surprised that Ubuntu allowed this by default.
Code:ls -dl /home/shared
Post #12 seems like a lot of effort but I am intrigued a little hehe.
What I meant by the comment is that I have 3 user accounts on this laptop. If I login to any of the other 2 user accounts, I am able to browse the contents of /home/iain. So I setup the permissions via Nautilus to not allow people of the same group(iain) to view my files as this is why I am setting up a shared folder.
Hope that makes more sense.
The results of the command you requested is:
Code:iain@ubuntu:/home$ ls -dl /home/share drwxrws--- 5 root family 4096 Aug 11 17:44 /home/share
Last edited by idonald; August 20th, 2012 at 09:10 PM.
This is a guess. And it's a guess only because it's the only way so far that I can reproduce your symptoms.
** The group "iain" is a "private group" or "usergroup" so the only one that has access to that group is the user: iain.So I setup the permissions via Nautilus to not allow people of the same group(iain) to view my files as this is why I am setting up a shared folder.
** The default ownership and permissions of your home folder was 755 meaning only iain had read /write access but everyone else had read access.
** Instead of changing permissions to 750, which would have made your home folder inaccessible to everyone other that iain, you went to the limit and set it to 700 which would have made it inaccessible to the group iain which was unnecessary.
** When you did that you selected "Apply Permissions to Enclosed Files" making all your files have permissions of 600. There was no need to do that because the parent directory was already set to 700 so no one other than iain could have opened up that folder to get to the contents.
If I move a file with permissions of 600 from /home/iain to /home/share it's group will in fact change from iain to family but it's permissions will remain at 600 forcing you to change permissions not group.
At this point I would argue that the easiest way is to use bindfs on the shared folder. If setting up an Upstart job seems too complex to you there is another way:
[1] Make sure a temporary manual mount does what you want it to do:
From that point on during that session is doesn't matter what permissions you set via Nautilus or with a chmod or chown. Normal Linux permission utilities will no longer have any affect - bindfs is in charge. All new and existing files will be 660, all new and existing folders will be 770, and all will have group = family.Code:sudo bindfs -o group=family,perms=0660:ug+D /home/share /home/share
[2] Instead of an upstart job edit a file as root:
And right above the "exit 0" line add the following line:Code:gksu gedit /etc/rc.local
An upstart job removes all doubt that the bindfs command will only run after the partition is mounted because it's designed to wait for confirmation. Since the partition in question in this topic is the root partition itself rc.local should work as well.Code:bindfs -o group=family,perms=0660:ug+D /home/share /home/share
Last edited by Morbius1; August 21st, 2012 at 01:00 PM.
Bookmarks