好的,我在 Centos 6.7 环境中配置了 smb,我使用 smbpasswd -a 添加了用户 root,当我从 Windows 框浏览到共享时,我连接到我为其创建了密码的 samba root 用户,但是当我单击目录时,我没有 linux root 权限。如下所示,我想要访问 /。以下是配置:
[Daze]
comment = Default connect
path = /
valid users = admin root
force user = root
force group = root
browsable = yes
admin users = root, root
public = yes
writable = yes
create mask = 0777
read only = No
directory mode = 0777
在此先感谢您的帮助!
答案1
参数的参数valid users
必须用逗号分隔。另外,请注意您输入的是“writable”而不是writeable
。而且,由于writeable
是 的反向同义词read only
,因此无需声明该read only
参数。
这是正确的配置:
[Daze]
comment = Default connect
path = /
valid users = admin, root
force user = root
force group = root
browseable = yes
writeable = yes
admin users = root
public = yes
create mask = 0777
directory mask = 0777
使用这些配置重新启动您的 Samba 服务器(例如运行sudo service smbd restart
或sudo systemctl restart smbd.service
)并查看它是否有效。