1. 程式人生 > 實用技巧 >macOS 安裝工具 homebrew + gnuplot

macOS 安裝工具 homebrew + gnuplot

yum provides semanage
yum install -y policycoreutils-python

getenforce
sestatus
setenforce   

 /etc/selinux/config 
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.

修改檔案的SELinux標籤的命令:chcon ;restorecon

chcon [option]...  CONTXT  
/path/to/file... #直接對指定的檔案寫完整的安全上下文欄位 chcon [option]... [-u USER] [-r ROLE] [-l RANGE] [-t TYPE] FILE... #根據上下文型別更改 chcon [option]... --reference=RFILE FILE.... #參考RFILE的上下文修改FILE的上下文 -R :如果是目錄,將同時遞迴設定該目錄下所有檔案 restorencon [option] /path/to/somewhere -R:遞迴恢復處理 semanage fcontext
-l semanage fcontext -a -t httpd_sys_content_t ‘/testdir(/.*)?’ semanage fcontext -d -t httpd_sys_content_t ‘/testdir(/,*)?’ semanage port -l semanage port -a -t http_port_t -p tcp 9527 semanage port -d -t http_port -t -p tcp 9527 semanage port -m -t http_port_t -p tcp 9527
ls -lrZ