今天重新做samba实验的时候,本来想设置 /software 为Linux和Windows的共享文件夹,并且让 /software 映射到Windows,实现Linux和Windows的共享
# chcon -t samba_share_t /software
chcon: can’t apply partial context to unlabeled file /software
结果实验快成功时,遇到一个这样的问题:提示说无标号文件 /software,结果郁闷了半天,把所有防火前都关了,又把实验重新做了一遍,还是不行。
网上找了半天资料,后面发现问题就出在 selinux 防火墙上,关了也不行啊,立即开启,重新开机,一切OK!!
修改/etc/selinu/config 文件:
[root@master ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing – SELinux security policy is enforced.
# permissive – SELinux prints warnings instead of enforcing.
# disabled – SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted – Only targeted network daemons are protected.
# strict – Full SELinux protection.
SELINUXTYPE=targeted
然后reboot重启机器后,就好了。