Samba服务器的搭建与配置(2)
[homes]
comment = Home Directories
browseable = no
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
#homes段满足第1条件
[caiwu]
comment = caiwu
path = /home/samba/caiwu
public = no
valid users = @caiwu,@lingdao,network02
write list = caiwu01
printable = no
#caiwu段满足我们的第2要求
[lingdao]
comment = lingdao
path = /home/samba/lingdao
public = no
browseable = no
valid users = @lingdao,network02
printable = no
#lingdao段能满足我们的第3要求
[exchage]
comment = Exchange File Directory
path = /home/samba/exchange
public = yes
writable = yes
#exchange段基本能满足我们的第4要求,但不能满足每个人不能删除别人的文件这个条件,即使里设置了mask也是没用,其实这个条件只要unix设置一个粘着位就行。
chmod -R 1777 /home/samba/exchange
注意这里权限是1777,类似的系统目录/tmp也具有相同的权限,这个权限能实现每个人能自由写文件,但不能删除别人的文件这个要求。