- 论坛徽章:
- 1
|
引用版主的话:
===========================================
1.每个用户有个私人目录 .
2.每个部门有一个只读共享目录,和一个文件交换目录.对其他部门不可用.
3.一个所有人公用只读共享目录,和一个所有人公用的交换目录.
管理员或者提定用户可以对除私人 ...
首先建议在权限调整方面完全用posix acl 如果对ACL不熟悉请看看这个
http://bbs.chinaunix.net/viewthr ... &extra=page%3D4
smb.conf
[global]
security = user
#============================ Share Definitions ==============================
1.每个用户有个私人目录
[homes]
comment = Home Directories
browseable =no
writable = yes
2.每个部门有一个只读共享目录(假设为a这个部门)
ps:但是你要保证,a这个组里的用户是你a这个部门的用户。
[share1]
comment=share1
path=/data/share1
readonly=yes
此时权限调整时用acl
setfacl -R -m g:a:rx,o::- /data/share1
setfacl -R -m d:g:a:rx,d:o::- /data/share1
和一个文件交换目录.对其他部门不可用(假设为a这个部门)
[share2]
comment=share2
path=/data/share2
writable=yes
此时权限调整时用acl
setfacl -R -m g:a:rwx,o::- /data/share2
setfacl -R -m d:g:a:rwx,d:o::- /data/share2
3.一个所有人公用只读共享目录
[share3]
comment=share3
path=/data/share3
readonly=yes
这个目录的权限设置就比较简单。
可以是644 与可以是555
这个随便你,如果要特殊设置,请用ACL
和一个所有人公用的交换目录.
[share4]
comment=share4
path=/data/share4
writable=yes
force create mode=0777
create mask=0777
directory mask=0777
权限设置用chmod -R 777 /data/share4 |
|