我在我的服务器上使用 Samba 已经有一段时间了,没有遇到太多麻烦。但是今天我在 NAS4Free(11.1.0.4 - Atomics (修订版 4729)) 上尝试了它,遇到了以下问题:我有一个共享,其设置如下:
[HQ]
comment = Share for the HQ department
path = /mnt/zfs/HQ
writeable = yes
printable = no
veto files = /.snap/.sujournal/
hide dot files = yes
guest ok = no
inherit permissions = yes
inherit acls = yes
vfs objects = shadow_copy2 zfsacl recycle
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = yes
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
shadow:format = auto-%Y%m%d-%H%M%S
shadow:snapdir = .zfs/snapshot
shadow:snapdirseverywhere = yes
shadow:sort = desc
shadow:localtime = yes
veto files = /.zfs/
valid users = @dsi-hq
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 0777
如果我在文件夹中创建新文件,它具有以下权限:
-rwxrw-rw- 1 aron wheel 0 {date} {file}
因此,即使我强制使用创建模式 0777,我还是无法执行该文件。此外,如果其他用户尝试编辑该文件,他的权限将被拒绝。
更多信息:
用户组 aron: dsi-hq
用户组标记:dsi-ict
地图结构:/mnt/hq/ict(aron 在 hq 上有共享,mark 在 ict 上有共享)
ICT份额:
[ICT]
comment = Share for the ICT department
path = /mnt/zfs/HQ/ICT
writeable = yes
printable = no
veto files = /.snap/.sujournal/
hide dot files = no
guest ok = no
inherit permissions = yes
inherit acls = yes
vfs objects = shadow_copy2 zfsacl recycle
nfs4:mode = special
nfs4:acedup = merge
nfs4:chown = yes
recycle:repository = .recycle/%U
recycle:keeptree = yes
recycle:versions = yes
recycle:touch = yes
recycle:directory_mode = 0777
recycle:subdir_mode = 0700
shadow:format = auto-%Y%m%d-%H%M%S
shadow:snapdir = .zfs/snapshot
shadow:snapdirseverywhere = yes
shadow:sort = desc
shadow:localtime = yes
veto files = /.zfs/
valid users = @dsi-ict
create mask = 0777
directory mask = 0777
force create mode = 0777
force directory mode = 777