Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

What is the best way to provide a common drop box for all users, so that any user that is a part of a particular group can read and write to and from the directory? I thought of creating a directory outside of the /home directory, creating a group specifically for accessing the directory, then adding all desired users to that group, and finally adding a symlink to the home directory of each user that points to the drop box folder. That seems like a lot of work. Is there a better way?

I'm running ubuntu 10.04 LTS.

share|improve this question

2 Answers 2

I'm not quite sure if you want a drop bop for all users, which would imply that all users could write to it, or a drop box that some users can drop into but all users can read from. Assuming the latter:

1) Create a dir somewhere.

2) Create a group

3) Add users who you want to have write access to group

4) chgrp

5) chmod g+rws

6) chmod o+rx

The +s in the chmod will set the sticky bit which will cause all files/dirs that are created in to have the group and read/write perms for .

share|improve this answer

You could try using ACLs each user would have specific permissions and you can make custom access to the file and directory.

man setfacl


Another way that comes to my mind is perhaps making a symbolic link of /tmp for your users since it already has the desired permission to acomplish what you want.


Your plan sounds ok aswell, example:

  1. mkdir /my_shared_folder
  2. groupadd my_share_group
  3. add users that will have access to the group
  4. chmod -R ug+rwx /my_shared_folder
  5. chown -R root:my_share_group
  6. for f in /home/*; do ln -s /my_shared_folder /home/$f/my_shared_folder; done
  7. chmod -R g+s /my_shared_folder (optional, this will allow users to create,delete,modify files/directories)
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.