获取当前selinux当前状态
getenforce
修改 /etc/selinux/config文件,
修改:
SELINUX=enforcing
=》
SELINUX=permissive
然后重启reboot
再次查看状态
getenforce
也可以再修改回到enforcing
我们可以通过restorecon 命令来重置一个文件或者文件夹
例如:
restorecon -Rv /custom
当然也可以通过制定selinux context的方式来做
semanage fcontext -a -t httpd_sys_content_t ‘/custom(/.*)?’
Latest posts by Zhiming Zhang (see all)
- aws eks node 自动化扩展工具 Karpenter - 8月 10, 2022
- ReplicationController and ReplicaSet in Kubernetes - 12月 20, 2021
- public key fingerprint - 5月 27, 2021