[Samba] Write Windows → Samba: "Access denied"
Gilles
codecomplete at free.fr
Mon Jun 16 10:53:19 UTC 2025
Hello
I set up a new Debian 12 host with Samba 4.17.12-Debian and the settings
that work on another host… and I can't figure out why I get an "Access
denied" when copying a file from Windows to Samba, although smbd.log
says "www-data closed file backup.tar.gz (numopen=1) NT_STATUS_OK".
I found no obvious difference in smb.conf, the filesystem ownership, and
fstab.
Any idea?
Thank you.
================ root at debian-lenovo:~# cat /etc/samba/smb.conf
[global]
netbios name = DEBIAN-LENOVO
server role = standalone
disable netbios = yes
smb ports = 445
map to guest = Bad User
guest account = www-data
interfaces = 192.168.0.17/255.255.255.0 127.0.0.1/255.255.255.255
bind interfaces only = yes
log level = 2
printcap name = /dev/null
load printers = no
printing = bsd
[my_data]
path = /my_data
;comment = No need for Unix/Samba passwords
guest ok = yes
writeable=yes
browseable=yes
create mode = 0644 ; still -rw-r-xr-x
;doesn't work with vfat fs
force user = www-data
force group = www-data
force create mode = 0644 ; makes no difference
================ root at debian-lenovo:~# ll //my_data
drwxr-xr-x 2 www-data www-data 4096 Jun 15 22:10 ./
drwxr-xr-x 20 root root 4096 Jun 13 16:21 ../
-rw-r--r-- 1 www-data www-data 4250 Jun 15 22:10 backup.tar.gz
================ root at debian-lenovo:~# cat /etc/fstab
UUID=83f362b4-80df-4158-a9f2-020bd56d5b58 / ext4
errors=remount-ro 0 1
UUID=1617087e-3d7b-4b03-b6bd-39c00e874139 none swap sw
0 0
================ root at debian-lenovo:~# tail /var/log/samba/log.smbd
…
[2025/06/16 12:40:48.121576, 2]
../../source3/smbd/close.c:830(close_normal_file)
www-data closed file backup.tar.gz (numopen=1) NT_STATUS_OK
More information about the samba
mailing list