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!

  • Directly on the server, or from a connected SMB client? – AlexP Jan 08 '19 at 01: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 08 '19 at 01: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 08 '19 at 01: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 08 '19 at 01:52
  • Plex is installed on the server, so it will access the content their, the program has a user "plex". I created a user with a password for me to access the server from my windows machine based desktop. – Kurt Kaiser Jan 08 '19 at 01:54
  • 4
    Possible duplicate of Good and easy way to share files on local machine. Also related: https://askubuntu.com/questions/52584/how-do-i-set-up-a-folder-so-that-anything-created-in-it-inherits-permissions – Takkat Jan 08 '19 at 07:33

1 Answers1

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.

AlexP
  • 10,197