我有一个 proxmox 安装,其中包含一些 ZFS 共享。这些共享是使用以下方式创建的:
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
答案1
valid users = @samba-peter
指定允许属于 的用户group samba-peter
。删除@
或确保 peter 属于该组samba-peter