I have a few users sharing a computer and accessing content (pictures, audio, video recordings etc) that other users save. I need a shared drive for this content. File permissions, access control or overwriting is not an issue - just need a simple method to share files, in fact, without worrying about ownership and read-write privileges.

I used to have a hard-drive partition that was formatted NTFS which so far served this purpose, but I am getting tired to having to run chkdsk every now and then so am looking for a solution that is more native to Linux.

Unlike this question, this is not about the path of the directory, but about the way to implement the store - e.g., Filesystem, share configuration etc.,.

This setting is required only for this shared folder- otherwise, these users and their (other) data needs to be kept private like in any standard Linux installation.


Just create a directory, for example /usr/shared and give access to everybody:

sudo mkdir /usr/shared && sudo chmod 777 /usr/shared

Now, everyone can write to that directory and nothing else has been changed (with respect to the user's personal files etc.). Of course, this means that any user will be able to delete any files in it, but you said that permissions, access control and overwriting is not an issue.

  • when users create files/ directories within this won't it be only readable/ writeable to them or their group members based on their umask settings ? – koushik Oct 26 '15 at 17:47
  • 2
    First, don't put a directory any user can fill up where it can cause problems, like under /usr. A dedicated filesystem is probably best. Second, users shouldn't be able to delete or rename the shared directory itself since that needs write permission on the parent directory. Third, setting the shared directory permissions to 1777 will prevent users from deleting other users' files. You may even want to set the setgid bit on the directory and set the gid on the shared directory to some common group See gnu.org/software/coreutils/manual/html_node/… – Andrew Henle Oct 26 '15 at 17:51
  • Thanks @AndrewHenle. I understood terdon's choice of path as an example. – koushik Oct 26 '15 at 17:58
  • 1
    @AndrewHenle my understanding (which may well be flawed) is that the OP wants to have users able to delete other user's files. As for space, again, that's up to the OP. You're quite right about their not being able to delete the directory itself of course, don't know what I was thinking there. – terdon Oct 26 '15 at 18:01
  • 2
    imho, adding sudo setfacl -m d:m::rwx /usr/shared to your chain would set default permissions closer to what OP requires. – adonis Oct 26 '15 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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