#---------------
23 # SELINUX NOTES:
24 #
25 # If you want to use the useradd/groupadd family of binaries please run:
26 # setsebool -P samba_domain_controller on
27 #
28 # If you want to share home directories via samba please run:
29 # setsebool -P samba_enable_home_dirs on
30 #
31 # If you create a new directory you want to share you should mark it as
32 # "samba-share_t" so that selinux will let you write into it.
33 # Make sure not to do that on system directories as they may already have
34 # been marked with othe SELinux labels.
35 #
36 # Use ls -ldZ /path to see which context a directory has
37 #
38 # Set labels only on directories you created!
39 # To set a label use the following: chcon -t samba_share_t /path
40 #
41 # If you need to share a system created directory you can use one of the
42 # following (read-only/read-write):
43 # setsebool -P samba_export_all_ro on
44 # or
45 # setsebool -P samba_export_all_rw on
bmbc123 于 2012-09-22 12:11:00发表:
哦,谢谢,我去看看
ryonji 于 2012-09-21 18:53:51发表:
在/etc/samba/smb.conf里,有教你怎么设,第22行起。
#---------------
23 # SELINUX NOTES:
24 #
25 # If you want to use the useradd/groupadd family of binaries please run:
26 # setsebool -P samba_domain_controller on
27 #
28 # If you want to share home directories via samba please run:
29 # setsebool -P samba_enable_home_dirs on
30 #
31 # If you create a new directory you want to share you should mark it as
32 # "samba-share_t" so that selinux will let you write into it.
33 # Make sure not to do that on system directories as they may already have
34 # been marked with othe SELinux labels.
35 #
36 # Use ls -ldZ /path to see which context a directory has
37 #
38 # Set labels only on directories you created!
39 # To set a label use the following: chcon -t samba_share_t /path
40 #
41 # If you need to share a system created directory you can use one of the
42 # following (read-only/read-write):
43 # setsebool -P samba_export_all_ro on
44 # or
45 # setsebool -P samba_export_all_rw on
alick 于 2012-09-21 18:42:02发表:
需要配置要共享的文件的 selinux context,
权威的解释见官方文档:
https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Confined_Services/sect-Managing_Confined_Services-Samba-Configuration_examples.html
这里的信息也许有参考作用:
http://wiki.tuna.tsinghua.edu.cn/SelinuxHowto