Search code examples
linuxpermissionssystem-administrationbsdfile-sharing

share directory with different users on a workstation on linux/bsd


I'm setting up a development workstation that used to have only one shared account to have an account for each developer that may be using it.

We commonly switch workstations. I would like to have certain directories "shared" by all users in a transparent manner.

I created /usr/local/share/workspace and /usr/local/share/rvm directories, which are symlinked to ~/workspace and ~/.rvm.

Subdirectories/files that are created within the directory should also be writable by all developers by default (without having to use sudo). I also would prefer not to set the directory to be world writable, since ruby gives me a warning because the rvm directory is on the path (I don't care about the security implications however).

How do I do this? Are there any resources that outline good practices?


Solution

  • If you want to share the directory on a single workstation, put all relevant users in a group (see man addgroup, and /etc/group), then run "chgrp -R yourgroup yourdir" on your directory trees. To give write permissions, run "chmod -R g+w yourdir".

    If you want to share it between different computers, you can use NFS. See for instance this HOWTO.