我有一个带有 samba 的文件服务器,共享 2 个 zfs 数据集。
uname -a
Linux pve 4.13.16-1-pve #1 SMP PVE 4.13.16-45 (Wed, 28 Mar 2018 15:47:11 +0200) x86_64 GNU/Linux
cat /etc/samba/smb.conf
[global]
map to guest = bad user
security = user
create mask = 0644
directory mask = 2755
force create mode = 0644
force directory mode = 2755
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
show add printer wizard = no
[media]
writeable = yes
read only = no
path = /mnt/pool/media
browseable = no
guest ok = no
comment = media share
map archive = no
map system = no
map hidden = no
[stuff]
writeable = yes
read only = no
path = /mnt/pool/stuff
browseable = no
guest ok = no
comment = media share
map archive = no
map system = no
map hidden = no
当我从网络上的任何客户端访问共享时,权限设置为以下内容:
ls -la /stuff/file.txt
-rw-r--r-- 1 user user 287 May 16 14:28
客户端有不同版本的 mount.cifs,有些是 6.7 (alpine),有些是 6.2 (centos)
由于某种原因,装有 Fedora 28 的笔记本电脑会看到如下权限:
uname -a
Linux fedora-laptop 4.16.8-300.fc28.x86_64 #1 SMP Wed May 9 20:23:40 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
mount.cifs -V
mount.cifs version: 6.8
ls -la /stuff/file.txt
-rwxr-xr-x 1 user user 287 May 16 14:28
尽管我用于挂载共享的命令在所有客户端上都是相同的:
mount -t cifs -o username=user //fileserver/stuff /mnt
使用 chmod -x 更改权限不会导致 Fedora 客户端发生任何变化。使用 chmod +x 更改权限可以让其他客户端看到执行位,但 Fedora 客户端上仍然没有任何变化。
有人知道为什么 Fedora 客户端会在那里显示执行位,即使其他客户端和文件服务器上没有执行位吗?