0

I m trying to setup custom User permissions for a certain user on my samba server. What i try to achieve is to login with mentioned user, lets say its name is user1, and only access two folders folder1, and folder2(with rwx permissions). The share contains plenty of other folders,which he should NOT see them. All my samba users are part of a group, lets say its called staff.

My global config is this :

[global]
log file = /var/log/samba/log.%m  
load printers = no  
socket options = TCP_NODELAY  
full_auditrefix = %u|%T|%m|%S  
full_audit:facility = local5  
interfaces = 192.168.0.20/255.255.255.0  
passdb backend = tdbsam  
allow hosts = 127. 192.168.0. 192.168.3.   
unix extensions = no  
cups options = raw  
vfs objects = full_audit  
full_audit:success = connect disconnect mkdir rmdir write sendfile rename unlink chmod fchmod chown fchown  
full_auditriority = notice  
workgroup = MYSERVER  
full_audit:failure = connect  
use sendfile = yes  
security = user  
max log size = 50   

The shared directory config :

[share]  
writeable = yes  
path = /home/share
vfs object = full_audit  
comment = Linux  
valid users = user1,user2,user3  
create mode = 0660  
directory mode = 0770  

With this configuration user1 can login and see all the files and folders. (which is not my purpose)

If i erase user1 from the staff group, and set the mentioned folder1, folder2 with the permissions of 777, the user wont have permission to access the server. I just tested it.

So my question is how can i provide for the user accessibility to the share, but restriction to those folders only?

The mentioned shares permissions are:

drwxrwxr-- 28 root staff 4.0K Jan 30 16:22 share
0

I found one helpful link hope this can help you with your issue. https://www.samba.org/samba/docs/using_samba/ch09.html

Br.

  • Thanks for the link, but i sorted out the problem. The shared folder should have had execute permission added additionally for other to login. – cz.steve Feb 1 '17 at 16:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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