1

I am setting up a directory for media. I need two users to be able to read, write and execute any content inside a directory, even if the other user created it.

The directory is a samba share. I want a user, bob, to be able to access it and allow the user plex to access it. Both users must have full access to all directories. So if the shared directory is called /myShare, and bob creates a directory inside of it /myShare/bobs, the user plex could read write execute and delete any content inside of /myShare/bobs.

I am somewhat new to Ubuntu, but I have spent hours and hours on this.

Any suggestions would be VERY VERY VERY VERY VERY appreciated!

marked as duplicate by Takkat, karel, Eric Carvalho, Charles Green, Thomas Jan 13 at 8:14

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Directly on the server, or from a connected SMB client? – AlexP Jan 8 at 1:42
  • If from a connected SMB client, Samba can arrange for that. If directly on the server, you can put both users in a special purpose group, or use ACLs; see the manual pages for access control lists and setfacl. – AlexP Jan 8 at 1:49
  • The directory is on the server. I use Samba to share that directory so I can access it from my desktop. Thanks for the advice. I am pretty new to this. There isn't just some standard command line stuff to setup access for users bob and plex? – Kurt Kaiser Jan 8 at 1:51
  • The question is, do you want the two different users to access it when they are logged in on the server (for example, through SSH), or do you want them to access it as a network share from their desktop computers? – AlexP Jan 8 at 1:52
  • 4
    Possible duplicate of Good and easy way to share files on local machine. Also related: askubuntu.com/questions/52584/… – Takkat Jan 8 at 7:33
1
sudo setfacl -m d:u:plex:rwX,d:u:bob:rwX /myShare

will set the default access control list for new files and directories created in /myShare to allow both users plex and bob to read, write and delete files. (X means x for directories, and obey normal mode for files.) If you want to apply the ACL to existing files and directories, use setfacl -R.

See the manual pages for access control lists and setfacl for details.

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