歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> Linux教程

CentOS中samba提示說無標號文件 /software

今天重新做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重啟機器後,就好了。

Copyright © Linux教程網 All Rights Reserved