LINUX: SELINUX: semanage Command To Set Read Only Access To Directory For HTTP Access
Following Command Can Be Used. In this case we are setting restriction on /u01/yum directory.
sudo semanage fcontext -a -t httpd_sys_content_t "/u01/yum(/.*)?"
To Check if the selinux rule is created run below command.
semanage fcontext -l | grep -i u01
You will see output as follows:
/u01/yum(/.*)? all files system_u:object_r:httpd_sys_content_t:s0
No comments:
Post a Comment