Shared files

Chuck Peters cp at ccil.org
Sat May 7 21:14:14 UTC 2011


On Sat, May 7, 2011 at 6:50 AM, Roy Smith <rasmith1959 at live.com> wrote:
>
> Hi!  I have a situation that I'd like to get some suggestions about.
> I'm setting up Ubuntu with a total of 5 user accounts (including
> myself).  I also have around 20GB of music, video and photo files that I
> would like each account to have access to.  Instead of each user account
> having the same files in their user folder, I've though about setting up
> a separate folder that everyone can access.  So what would be the best
> security settings as far as Owner, Group and permissions would be to
> allow everyone access to these files?

Use symbolic links or symlinks.
In this example user2 would have a user1share directory pointing to
the shared files in /home/user1/sharedstuff. Note that this assumes
everyone can read the files, which is what the default permissions are
in Ubuntu.
cd ~user2
ln -s /home/user1/sharedstuff user1share


If you want others to have write access, look up the user group scheme
[1], or as they call it now "user private group."  Each user has a
unique uid (and username) and gid (and group) and you add a group and
add users to the group, then set the permissions so others can write
to it. To add shared write access to a directory.
addgroup sharedgroup
chgrp sharedgroup  /home/user1/sharedstuff
Add any users to the group with the command vigr,
chmod g+sw /home/user1/sharedstuff
And perhaps use a chmod -R to recursively change permissions to all
the subdirectories and files.


1. http://www.oreillynet.com/onlamp/blog/2006/09/using_user_private_groups.html
http://en.wikipedia.org/wiki/Filesystem_permissions#User_private_group


Chuck




More information about the ubuntu-users mailing list