I have a file/media server running Samba, Plex and Transmission. However I am having a little trouble with the access permissions of my media folder. This folder needs to grant access to the 'david', 'plex' and the 'debian-transmission user. So I made a group called 'media_users' and added them to the group and added the appropriate permission to the media folder. Now I am unable to access the shared folder from my windows machine and plex does not have a access to the files.
Does someone have an idea what I did wrong?
david@server:/mnt/storagedata$ groupadd media_users
david@server:/mnt/storagedata$ sudo usermod -a -G media_users david
david@server:/mnt/storagedata$ sudo usermod -a -G media_users debian-transmission
david@server:/mnt/storagedata$ sudo usermod -a -G media_users plex
david@server:/mnt/storagedata$ sudo chown -R root:media_users media
david@server:/mnt/storagedata$ sudo chmod 770 -R media
david@server:/mnt/storagedata$ ls -l
drwx------ 10 david david 10 Jul 13 00:54 david
drwxrwx--- 6 root media_users 6 Feb 26 18:12 media
david@server:/mnt/storagedata$ sudo testparm
...SNIP...
[david]
path = /mnt/storagedata/david
force user = david
read only = No
[media]
path = /mnt/storagedata/media
read only = No
Best Answer
Samba has a group by default to allow sharing. To add a user to that group just type
sudo gpasswd -a david sambashare
. Logout and log back in for the changes to take affect. When you map the network drive in Windows you will need to provide the credentials (linux ones) for david. Your samba configuration might need a little tweaking. Here's mine for example:[Chol] comment = Shares path = /home/chol browseable = yes read only = no public = yes guest ok = no valid users = chol create mask = 0777 writeable = yes