Nextcloud SELinux Hardening #8
claudiomaradonna
commented 2021-09-27 19:14:15 +02:00
(Migrated from gitea.it)
```bash
#INSTALLATION (Unitoo ha data spostata)
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/vhosts/cloud.unitoo.pw/data(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/vhosts/cloud.unitoo.pw/httpdocs/config(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/vhosts/cloud.unitoo.pw/httpdocs/apps(/.*)?'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/vhosts/cloud.unitoo.pw/httpdocs/.htaccess'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/vhosts/cloud.unitoo.pw/httpdocs/.user.ini'
restorecon -Rv '/var/www/vhosts/cloud.unitoo.pw/data/'
restorecon -Rv '/var/www/vhosts/cloud.unitoo.pw/httpdocs/'
setsebool -P httpd_unified off
#UNINSTALL
semanage fcontext -d '/var/www/vhosts/cloud.unitoo.pw/data(/.*)?'
semanage fcontext -d '/var/www/vhosts/cloud.unitoo.pw/httpdocs/config(/.*)?'
semanage fcontext -d '/var/www/vhosts/cloud.unitoo.pw/httpdocs/apps(/.*)?'
semanage fcontext -d '/var/www/vhosts/cloud.unitoo.pw/httpdocs/.htaccess'
semanage fcontext -d '/var/www/vhosts/cloud.unitoo.pw/httpdocs/.user.ini'
restorecon -Rv '/var/www/vhosts/cloud.unitoo.pw/data/'
restorecon -Rv '/var/www/vhosts/cloud.unitoo.pw/httpdocs/'
setsebool httpd_unified on
```
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?