我無法在新安裝的 Samba 和 Centos 7 上收到文件變更通知。
我有兩個伺服器叢集。第一個運行 Centos 6.9,具有較舊的 Samba 版本 (3.6.23),第二個運行 Centos 7,具有 Samba 版本 4.6.2
對於第一個,我可以透過映射網路磁碟機使用 Windows 7 連接到 samba 共用。當文件更改時,我立即在編輯器視窗中看到更新。
對於第二個,我以相同的方式使用相同的憑證進行連接,但文件更新不存在。我必須關閉並重新打開文件才能看到所做的更改。
這種情況已經發生了幾個月,我每隔幾個月就會抽出時間研究這個主題,我花了幾個小時試圖修復它但無濟於事。我在這個網站和谷歌上花了無數的時間。
以下是兩個不同伺服器叢集的配置和共享資訊。
集群 1:
uname -r:
2.6.32-696.13.2.el6.x86_64
lsb_release -a:
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.9 (Final)
Release: 6.9
Codename: Final
smbstatus:
Samba version 3.6.23-45.el6_9
PID Username Group Machine
-------------------------------------------------------------------
18490 user1 group1 comp1 (192.168.*.*)
21138 user2 user2 comp2 (192.168.*.*)
14315 user2 user2 comp3 (192.168.*.*)
Service pid machine Connected at
-------------------------------------------------------
share1 18490 comp1 Wed Mar 21 09:59:20 2018
share2 14315 comp3 Tue Mar 20 10:07:59 2018
share3 14315 comp3 Tue Mar 20 10:07:59 2018
share2 21138 comp2 Tue Mar 20 10:24:53 2018
No locked files
smb.conf:
[global]
workgroup = FSWD
server string = Samba Server Version %v
passdb backend = tdbsam
guest account = apache
cups options = raw
[websites]
comment = Virtual Hosts
path = /a/b/c
read only = No
create mask = 0644
directory mask = 0755
集群 2:
uname -r:
3.10.0-693.2.2.el7.x86_64
hostnamectl:
Static hostname: srv.home.com
Icon name: computer-vm
Chassis: vm
Machine ID: b8d0aff7632764daf448b26e28de2cd8
Boot ID: 4548a3abbc356918b77ae462a058728d
Virtualization: kvm
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-693.2.2.el7.x86_64
Architecture: x86-64
smbstatus:
Samba version 4.6.2
PID Username Group Machine Protocol Version Encryption Signing
----------------------------------------------------------------------------------------------------------------------------------------
1218 user1 group1 192.168.0.1 (ipv4:192.168.0.1:49969) SMB2_10 - -
1268 user1 group1 192.168.0.2 (ipv4:192.168.0.2:57232) SMB3_11 - partial(AES-128-CMAC)
Service pid Machine Connected at Encryption Signing
---------------------------------------------------------------------------------------------
share1 1268 192.168.0.2 Wed Mar 21 10:02:17 AM 2018 MDT - -
share2 1218 192.168.0.1 Wed Mar 21 09:59:20 AM 2018 MDT - -
Locked files:
Pid Uid DenyMode Access R/W Oplock SharePath Name Time
--------------------------------------------------------------------------------------------------
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f Wed Mar 21 10:10:46 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f Wed Mar 21 10:10:46 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f Wed Mar 21 10:12:09 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c . Wed Mar 21 10:10:50 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c . Wed Mar 21 10:12:09 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f/logs Wed Mar 21 10:10:45 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f/logs Wed Mar 21 10:10:46 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e/f/logs Wed Mar 21 10:12:09 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d/e Wed Mar 21 10:12:09 2018
1268 501 DENY_NONE 0x100081 RDONLY NONE /a/b/c d Wed Mar 21 10:12:09 2018
1218 501 DENY_ALL 0x100080 RDONLY NONE / . Wed Mar 21 09:59:43 2018
smb.conf:
[global]
workgroup = MYCOMPANY
server string = Samba Server Version %v
guest account = apache
log file = /var/log/samba/log.%m
max log size = 50
security = user
passdb backend = tdbsam
load printers = yes
cups options = raw
[homes]
comment = Home Directories
browseable = no
writable = yes
[main]
comment = Server Main
valid users = user1
path = /a/b/c
read only = No
writable = yes
force group = group1
create mask = 0664
directory mask = 0775