Answers:
编辑 /etc/samba/smb.conf
# command line
sudo -e /etc/samba/smb.conf
# graphical
gksu gedit /etc/samba/smb.conf
在write list
共享定义中添加参数,在允许写访问权限的用户列表中添加。
write list = user1 user2 user3
您可以使用read list
,以及
read list = guest, nobody
所以...
[share]
comment = Ubuntu Share
path = /your/samba/share
browsable = yes
guest ok = yes
read only = yes
write list = user1 user2 user3
create mask = 0755
如果需要更好的控制权,则可以在服务器上使用acl(访问控制列表)。
read only
只能是 yes
或no
,不能使用用户名或组作为其值。
read only
到guest nobody
的建议,但它所作的只是移除访客访问我的共享干脆,好像guest ok
已经no
。使用write list
工作就像一种魅力,仅可惜我必须为我添加的每个新用户更新它。
只读参数是一个布尔值,因此它应该更像以下之一:
[share]
comment = Ubuntu Share
path = /your/samba/share
browsable = yes
guest ok = yes
read only = no
read list = guest nobody
write list = user1 user2 user3
create mask = 0755
[share]
comment = Ubuntu Share
path = /your/samba/share
browsable = yes
guest ok = yes
read only = yes
write list = user1 user2 user3
create mask = 0755
lp_bool(guest nobody): value is not boolean!