Controll the folder access by applications
getenforcesestatus
- Set
SELinuxto permissive
sudo setenforce permissive tail -f /var/log/audit/audit.log
- Copy the settings from a default folder, i.e,:
ls -laZ /var/www- Change the type of the folder
sudo chcon -Rv --type=httpd_sys_content_t /netshare/www- Install
dnf install policycoreutils-develto provideaudi2allow - Set selinux to permissive
sudo setenforce permissive
`
2. Use the audit error log to create a policy module
```bash
sudo grep httpd /var/log/audit/audit.log | audit2allow -M httpd- Install the policy file
sudo semodule -i httpd.pp- Set SELinux to enforcing mode
sudo setenforce enforcing