mirror of
https://github.com/nextcloud/documentation.git
synced 2026-01-02 17:59:36 +07:00
Merge pull request #50 from ayamshanov/fix_SELinux_commands
Fix semanage argument and add recursion and verbose for restorecon
This commit is contained in:
@@ -12,22 +12,22 @@ The following settings should work for most SELinux systems that use the
|
||||
default distro profiles. Run these commands as root, and remember to adjust the filepaths
|
||||
in these examples for your installation::
|
||||
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data'
|
||||
restorecon '/var/www/html/nextcloud/data'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config'
|
||||
restorecon '/var/www/html/nextcloud/config'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps'
|
||||
restorecon '/var/www/html/nextcloud/apps'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/data'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/config'
|
||||
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/apps'
|
||||
|
||||
If you uninstall Nextcloud you need to remove the Nextcloud directory labels. To do
|
||||
this execute the following commands as root after uninstalling Nextcloud::
|
||||
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data'
|
||||
restorecon '/var/www/html/nextcloud/data'
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config'
|
||||
restorecon '/var/www/html/nextcloud/config'
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps'
|
||||
restorecon '/var/www/html/nextcloud/apps'
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/data(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/data'
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/config(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/config'
|
||||
semanage fcontext -d -t httpd_sys_rw_content_t '/var/www/html/nextcloud/apps(/.*)?'
|
||||
restorecon -v -R '/var/www/html/nextcloud/apps'
|
||||
|
||||
If you have customized SELinux policies and these examples do not work, you must give the
|
||||
HTTP server write access to these directories::
|
||||
@@ -80,4 +80,4 @@ For general Troubleshooting of SELinux and its profiles try to install the packa
|
||||
|
||||
sealert -a /var/log/audit/audit.log > /path/to/mylogfile.txt
|
||||
|
||||
to get a report which helps you configuring your SELinux profiles.
|
||||
to get a report which helps you configuring your SELinux profiles.
|
||||
|
||||
Reference in New Issue
Block a user