0

I have two users: "pi" and "austria". Both users are in group www-data, which group is the owner of /mnt and can't be modified, as it's hosted. I want to separate the permissions in the samba. User pi to have permissions of the whole mount point /mnt/EXHDD1TB and user "austria" to have permissions only to the subfolder of /mnt/EXHDD1TB/ called "Movies", without the upper folder. My current smb.conf is the bellow one, but with this config user "austria" has access to everything, not only to the specific folder. Can you please help

[Movies]
comment = External Drive
path=/mnt/EXHDD1TB/Movies
valid users = austria
force group = www-data
writeable   = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
[All]
comment = External Drive
path=/mnt/EXHDD1TB/
valid users = pi, austria
force group = www-data
writeable   = yes
create mask = 0660
force create mode = 0110
directory mask = 0770
browseable = no
0

As you don't want the user "austria" to have mount permissions for All, you should remove that user from the list of valid users.

User "austria" will have to access the share Movies, not All.

5
  • I already tried this, but with this configuration, I’m getting access denied. Without austria in All group, the user can’t access anything – user3493945 Feb 24 '19 at 11:06
  • What exactly have you tried, which error message did you get, is there anything in the logs? – RalfFriedl Feb 24 '19 at 11:08
  • When I remove “austria” user, from valid users “All” group configuration - mount the drive with \\192.168.1.10\share and use austria as login user to access it I’m getting “Access denied. Contact your server administrator”. When the user is configured in All group valid users, it has access to the whole drive. I need austria user to have access only to Movies folder, and pi user to the whole drive – user3493945 Feb 24 '19 at 11:47
  • You need \\192.168.1.10\Movies. – RalfFriedl Feb 24 '19 at 17:43
  • Yep that worked, all the time I was using the same share with diff credentials. I thought that All and Movies are user groups, not shares. Thanks for the help – user3493945 Feb 26 '19 at 2:42

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.