Docker 掛載許可權 chcon: can't apply partial context to unlabeled file

giserinchina發表於2018-09-30

Docker 掛載許可權 chcon: can't apply partial context to unlabeled file

 

參考:http://www.linuxidc.com/Linux/2012-09/70199.htm

 

# chcon -t samba_share_t /software 

chcon: can't apply partial context to unlabeled file /software

 

修改/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重啟機器後,就好了。

相關文章