配置selinux
[[email protected] samba]# getsebool -a | grep samba 查找selinux中对samba的限制项
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> off
samba_export_all_rw --> off
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off
[[email protected] samba]# setsebool -P samba_export_all_rw=1(=0是关闭)
[[email protected] samba]# setsebool -P samba_export_all_ro=1
[[email protected] samba]# getsebool -a | grep samba
samba_domain_controller --> off
samba_enable_home_dirs --> off
samba_export_all_ro --> on(如果只读共享的文件只开此项就行)
samba_export_all_rw --> on(如果读写,只开此项就行,修改文件时要看文件的chmod属性。)
samba_share_nfs --> off
use_samba_home_dirs --> off
virt_use_samba --> off
如不想共享文件可运行如下语句
[[email protected] samba]# setsebool -P samba_export_all_rw=0
[[email protected] samba]# setsebool -P samba_export_all_ro=0