[Samba] Toggling access denied when writing/deleting

Bird Developr bird.developer at gmail.com
Thu Mar 9 19:06:16 UTC 2017


I have very weired access denied problem with Samba.

Problem description:
I have a NAS with Samba as a file server installed. Samba works fine as
expected several days ago. I could write, read and delete files on the
share. After copying files from a Win10 client to the server I can only
read the files from the Samba share, but I can not copy new files to the
share nor delete files (ACCESS_DENIED error occurs). Strange thing is:
sometimes all is normal after a reboot so writing, deleting and reading
is fine. But after the next reboot or when restarting Samba, only
reading is possible.

File permissions should be correct (listed below). Even if the file has
permissions 0777 the file can not be deleted. The user that is used to
connect to the Samba server is "photos". If I log into the server, I'm
able to delete the file as user "photos". As attachments I send you the
succeed case (log level 5) and the failing case (log level 10).

System information:
* OS: CentOS 7.3
* Samba version: 4.4.4   12.el7_3
* Share is a mounted RAID 1 to /media/data
* SELinux is disabled to identify the problem

File permissions:
* drwxr-xr-x.  5  root   root   /media/data
* drwxr-xr-x.  50 photos photos /media/data/photos
* drwxrwxr-x.  4  photos photos /media/data/photos/Jahr 2017
* drwxr-xr-x.  2  photos photos /media/data/photos/Jahr 2017/Bilder 0510
* -rwxrwxrwx.  1  photos photos /media/data/photos/Jahr 2017/Bilder 0510

getfacl command for file __DSC3806.NEF:
	# file: _DSC3806.NEF
	# owner: photos
	# group: photos

User/Group information:
* user "photos" has id 1001
* group "photos" has id 1001

smb.conf file:
        workgroup = SAMBA
        security = user

        passdb backend = tdbsam

        printing = cups
        printcap name = cups
        load printers = no
        cups options = raw
        log level = 5
        encrypt passwords = Yes
        server max protocol = SMB3

        comment = Photos storage
        path = /media/data/photos
        valid users = photos
        writable = Yes
        browseable = Yes

Best regards,


More information about the samba mailing list