File permissions for shared home directories?
lists at avi.co
Fri Dec 28 15:40:07 UTC 2012
Steve Flynn wrote:
> On 24 December 2012 12:49, Jef Driesen <jefdriesen at hotmail.com> wrote:
> > Hi,
> > I have a NAS server with two unix accounts, named "me" and "wife". Each
> > account has its own home directory, which are exported over NFS. So far no
> > problem.
> > But I also have a common laptop which only has a single unix account which
> > is shared between the two persons. If I give the laptop user the same
> > UID/GID as the "me" account on the NAS, I can access my personal files. But
> > how do I make sure I can also access the files from the "wife" account?
> Groups. Add me and wife to a group (us) on the fileserver and perform
> a chgrp to "us" on all of the files/directories which you want to be
> accessible from both. Make the ownership on these files rwxrwx--- (or
> whatever suits you best - important bit is the middle "rwx" or the
> middle number if you're setting permissions via octal, which would be
> 770 for this example).
Also, set the sticky group bit so that all newly-created files inherit
the same ownership:
chmod g+s /home/me /home/wife -R
More information about the ubuntu-users