0

What is the proper permissions that should be set in the smb.conf and applied on the directory & files?

The reason I ask is I have set force user = nobody in smb.conf on my shares, with the file & folder permissions set to user nobody, group nogroup and 755 (ie: only the nobody user can write). However I can't copy a file to the directory across the network, as well as delete files etc.

If I change the file and folder permissions to 775 (ie: including write permissions for the group "nogroup"), everything works. I am ok with setting this permission, but I am curious as to why only this works to better understand linux/samba permissions. See below for relevant config:

smb.conf

[global]
workgroup = WORKGROUP
server string = %h server (Samba, Ubuntu)
security = user
map to guest = bad user
dns proxy = no
unix extensions = no
log level = 2
log file = /var/log/samba/samba-%S.log

[Data (data-2)]
path = /media/Data/disks/data-2
browsable = yes
writable = yes
guest ok = yes
read only = no
force user = nobody

ls -l ./data-2/ (single folder example)

Doesn't work (755): drwxr-xr-x  74 nobody nogroup      4096 Feb 22  2012 Photos
Works (775):        drwxrwxr-x  74 nobody nogroup      4096 Feb 22  2012 Photos
0

Ok, so I'm still not exactly sure whats going on... but I got the guest account to work with file and folder permissions set to 755.

To get it working, I had to do smbpassswd -a nobody (with no password). This still doesn't really make sense as if samba needs this account in its own database, then it shouldn't even be able to read the directory in the first place (before the user was added)?

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.