我有一个带有几个 ZFS 共享的 proxmox 安装。共享是使用创建的
zfs create storage/photos
sudo zfs set acltype=posixacl storage/photos
用户是使用创建的
sudo adduser --system --no-create-home samba-peter
sudo smbpasswd -a samba-peter
sudo setfacl -R -m "u:samba-peter:rwx" /storage/photos
然后我添加
[photos]
comment = photos
path = /storage/photos
read only = no
writable = yes
browseable = yes
guest ok = no
valid users = @samba-peter
和/etc/samba/smb.conf
增加日志记录使用log level = 2 winbind:5
。
现在,当我尝试使用Windows 10 21H2 19044.2604
它连接时记录
==> /var/log/samba/log.smbd <==
[2023/03/06 17:22:10.679844, 2] ../../source3/lib/tallocmsg.c:84(register_msg_pool_usage)
Registered MSG_REQ_POOL_USAGE
==> /var/log/samba/log.192.168.0.19 <==
[2023/03/06 17:22:10.685627, 2] ../../source3/auth/auth.c:323(auth_check_ntlm_password)
check_ntlm_password: authentication for user [samba-peter] -> [samba-peter] -> [samba-peter] succeeded
[2023/03/06 17:22:10.686016, 2] ../../source3/param/loadparm.c:2864(lp_do_section)
Processing section "[photos]"
==> /var/log/samba/log.fryr <==
[2023/03/06 17:22:10.689318, 1] ../../source3/smbd/service.c:362(create_connection_session_info)
create_connection_session_info: user 'samba-peter' (from session setup) not permitted to access this share (photos)
[2023/03/06 17:22:10.689346, 1] ../../source3/smbd/service.c:543(make_connection_snum)
create_connection_session_info failed: NT_STATUS_ACCESS_DENIED
似乎身份验证成功了(如果我使用错误的密码登录,日志会指出密码不正确)。但是访问目录失败了,但是我错过了什么我给了它访问权限setfacl -R -m "u:samba-peter:rwx" /storage/photos
Samba 版本:4.13.13-Debian
操作系统:Debian GNU/Linux 11 (bullseye)
内核:Linux 5.15.85-1-pve ZFS 版本:zfs-2.1.9-pve1, zfs-kmod-2.1.9-pve1