Web lists-archives.com

[Samba] Toggling access denied when writing/deleting




Hello,

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
(08.01.2017)
* -rwxrwxrwx.  1  photos photos /media/data/photos/Jahr 2017/Bilder 0510
(08.01.2017)/_DSC3806.NEF

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


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

smb.conf file:
[global]
        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

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



Best regards,

Vincent
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba