[Samba] Write Windows → Samba: "Access denied"

Gilles codecomplete at free.fr
Mon Jun 16 14:45:48 UTC 2025


On 16/06/2025 14:01, Rowland Penny via samba wrote:
> It appears that anyone can enter /my_data , but only www-data can write
> to the directory. As you are using Guest access and have set the guest
> user to 'www-data', then you should be able to write to the share.
>
> What could be happening is that Apparmor could be getting in the way, or
> guest access could be turned off on your Windows client, or there could
> be a bug in Samba.
>
> Could I suggest you upgrade Samba to the version available from
> bookworm-backports, this may fix your problem, but if it doesn't, you
> will then have a chance to get any potential bug fixed, 4.17.12 is EOL
> from the Samba point of view.

I didn't know what AppArmor was. Turning it off, restarting Samba, and 
trying to write a file still says Access Denied:
root at debian-lenovo:~# systemctl stop apparmor
root at debian-lenovo:~# systemctl restart samba

"journalctl -f" shows nothing when I try to copy a file to that new 
Debian host. Neither does /var/log/samba/log.smbd.

 From the same Win11 computer, I can write to another Debian12 host 
using the same smb.conf, where I didn't have to do anything more to 
write-access. It is also running Samba 4.17.12 so it doesn't look like 
it's a bug in Samba. Since it 's neither smb.conf, the filesystem, fstab 
nor Samba, it looks like the problem lies elsewhere.




More information about the samba mailing list