标签:
配置selinux
[root@localhost 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
[root@localhost samba]# setsebool -P samba_export_all_rw=1(=0是关闭)
[root@localhost samba]# setsebool -P samba_export_all_ro=1
[root@localhost 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
如不想共享文件可运行如下语句
[root@localhost samba]# setsebool -P samba_export_all_rw=0
[root@localhost samba]# setsebool -P samba_export_all_ro=0
标签:
原文地址:http://www.cnblogs.com/fjping0606/p/4573131.html