分类: LINUX
2008-04-22 22:27:12
配置文件如下,修改/etc/samba/smb.conf后,不要忘记重启smbd和nmbd服务器;
[global]
workgroup = LINUXSIR
netbios name = LinuxSir
server string = Linux Samba Test Server
security = share
[linuxsir]
comment = linuxsiradmin
path = /opt/linuxsir/
create mask = 0664
#create mask是用户创建文件时的权限掩码;对用户来可读可写,对用户组可读可写,对其它用户可读;
directory mask = 0775
#directory mask 是用来设置用户创建目录时的权限掩码,意思是对于用户和用户组可读可写,对其它用户可读可执行;
writeable = yes
valid users = linuxsir
browseable = yes
[sirshare]
path = /opt/linuxsir/sirshare
writeable = yes
browseable = yes
guest ok = yes
[sirallrw]
path = /opt/linuxsir/sirallrw
writeable = yes
browseable = yes
guest ok = yes
[sir0104rw]
comment = sir0104rw
path = /opt/linuxsir/sir0104rw
create mask = 0664
directory mask = 0775
writeable = yes
valid users = linuxsir,@sir0104
是用户组;
browseable = yes
[sir01]
comment = sir01
path = /opt/linuxsir/sir01
create mask = 0664
directory mask = 0775
writeable = yes
valid users = sir01,@linuxsir
browseable = yes
[sir02]
comment = sir02
path = /opt/linuxsir/sir02
create mask = 0664
directory mask = 0775
writeable = yes
valid users = sir02,@linuxsir
browseable = yes
[sir03]
comment = sir03
path = /opt/linuxsir/sir03
create mask = 0664
directory mask = 0775
writeable = yes
valid users = sir03,@linuxsir
browseable = yes
[sir04]
comment = sir04
path = /opt/linuxsir/sir04
create mask = 0664
directory mask = 0775
writeable = yes
valid users = sir04,@linuxsir
browseable = yes