[Samba] problem whit files locks

samba samba at chroot.pl
Wed Jan 6 17:26:04 UTC 2016


Hello,

	I have a problem with files locks on share. My server is running
FreeBSD 10.2 (amd64) with ZFS pool (raidz) for windows share and samba
4.3.3 (ROLE_ACTIVE_DIRECTORY_DC).
The server has approximately 100 users accounts and computers accounts.

>From one windows workstation I open a file e. g. text file (file.txt)
the smbstatus shows DENY_WRITE and everything seems right. But when I
open the same file from other windows workstation after about 5 minutes
or later it opens normally without warning message, so I can write to Hello,

	I have a problem with files locks on share. My server is running
FreeBSD 10.2 (amd64) with ZFS pool (raidz) for windows share and samba
4.3.3 (ROLE_ACTIVE_DIRECTORY_DC).
The server has approximately 100 users accounts and computers accounts.

>From one windows workstation I open a file e. g. text file (file.txt)
the smbstatus shows DENY_WRITE and everything seems right. But when I
open the same file from other windows workstation after about 5 minutes
or later it opens normally without warning message, so I can write to
this file. It looks like the file lock doesn't work any more because it
should be opened in read-only mode.

log.smbd shows:
../source3/smbd/close.c:268(close_remove_share_mode)
close_remove_share_mode: Could not get share mode lock for file
data/file.txt

I noticed the same situation with share based on UFS.

Here is my smb4.conf:

[global]
        dos charset = CP852
        unix charset = ISO8859-2
        workgroup = WORKGROUP
        realm = somedomain.int
        server role = active directory domain controller
        passdb backend = samba_dsdb
        min receivefile size = 16384
        kernel change notify = No
        dns forwarder = 192.168.1.1
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        rpc_server:tcpip = no
        rpc_daemon:spoolssd = embedded
        rpc_server:spoolss = embedded
        rpc_server:winreg = embedded
        rpc_server:ntsvcs = embedded
        rpc_server:eventlog = embedded
        rpc_server:srvsvc = embedded
        rpc_server:svcctl = embedded
        rpc_server:default = external
        winbindd:use external pipes = true
        idmap config nc:range = 10000-20000
        idmap config nc:backend = ad
        idmap_ldb:use rfc2307 = yes
        idmap config * : backend = tdb
        aio read size = 16384
        aio write size = 16384
        aio write behind = true
        write cache size = 262144
        map archive = No
        map readonly = no
        store dos attributes = Yes
        vfs objects = dfs_samba4 acl_xattr

[sysvol]
        path = /var/db/samba4/sysvol
        read only = No
        vfs objects = acl_xattr

[SHARE1]
        comment = SHARE1
        path = /mnt/zfs_share/SHARE1
        read only = No
        guest ok = Yes
        map acl inherit = Yes
        oplocks = No
        level2 oplocks = No
        vfs objects = zfsacl
        nfs4:chown = Yes
        nfs4:acedup = dontcare
        nfs4:mode = simple

Thank you for any ideas.

Regardsthis file. It looks like the file lock doesn't work any more
because it should be opened in read-only mode.

log.smbd shows:
../source3/smbd/close.c:268(close_remove_share_mode)
close_remove_share_mode: Could not get share mode lock for file
data/file.txt

I noticed the same situation with share based on UFS.

Here is my smb4.conf:

[global]
        dos charset = CP852
        unix charset = ISO8859-2
        workgroup = WORKGROUP
        realm = somedomain.int
        server role = active directory domain controller
        passdb backend = samba_dsdb
        min receivefile size = 16384
        kernel change notify = No
        dns forwarder = 192.168.1.1
        nsupdate command = /usr/local/bin/samba-nsupdate -g
        rpc_server:tcpip = no
        rpc_daemon:spoolssd = embedded
        rpc_server:spoolss = embedded
        rpc_server:winreg = embedded
        rpc_server:ntsvcs = embedded
        rpc_server:eventlog = embedded
        rpc_server:srvsvc = embedded
        rpc_server:svcctl = embedded
        rpc_server:default = external
        winbindd:use external pipes = true
        idmap config nc:range = 10000-20000
        idmap config nc:backend = ad
        idmap_ldb:use rfc2307 = yes
        idmap config * : backend = tdb
        aio read size = 16384
        aio write size = 16384
        aio write behind = true
        write cache size = 262144
        map archive = No
        map readonly = no
        store dos attributes = Yes
        vfs objects = dfs_samba4 acl_xattr

[sysvol]
        path = /var/db/samba4/sysvol
        read only = No
        vfs objects = acl_xattr

[SHARE1]
        comment = SHARE1
        path = /mnt/zfs_share/SHARE1
        read only = No
        guest ok = Yes
        map acl inherit = Yes
        oplocks = No
        level2 oplocks = No
        vfs objects = zfsacl
        nfs4:chown = Yes
        nfs4:acedup = dontcare
        nfs4:mode = simple

Thank you for any ideas.

Regards



More information about the samba mailing list