[Samba] [smb.conf] File permissions

Gilles codecomplete at free.fr
Thu Nov 4 12:59:49 UTC 2021


I have a few questions about how to write smb.conf:

1. Is there a way to set a non-root user when creating files?

2. Why is root used instead of www-data?

3. Why are new files 666 although I used "create mask = 0775"?

Thank you.

========= File created from Windows (7)
-rw-rw-rw- 1 root     root        4 Nov  4 13:47 test.txt

========= /etc/samba/smb.conf
workgroup = WORKGROUP
netbios name = DEBIAN

security = user
;simple way to avoid recreating user accounts in Samba to match those in 
map to guest = Bad User
;map to guest = Bad Password
;www-data used by Nginx
guest account = www-data

path = /mnt/sdcard
;comment = No need for Unix/Samba passwords
guest ok = yes
;valid users=www-data


create mask = 0775

More information about the samba mailing list