SElinux - restorcon doesn't want to change context.
Hello,
I've installed owncloud and set :
[code]
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/data'
restorecon '/var/www/html/owncloud/data'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/config'
restorecon '/var/www/html/owncloud/config'
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
restorecon '/var/www/html/owncloud/apps'
[/code]
Worked fine !
Worked fine until i did "restorecon -Rv /var/www/html", then all premissions for 3 undercatalogs of apps,config and data have changed from:
[code]
httpd_sys_rw_content_t -> httpd_sys_content_t
[/code]
After that i cant back to primary settings of selinux context. I tried:
[code]
[root@proton owncloud]# semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/owncloud/apps'
[root@proton owncloud]# restorecon -Rv '/var/www/html/owncloud/apps'
[root@proton owncloud]# ls -lZ '/var/www/html/owncloud/apps'
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 activity
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 comments
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 dav
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 encryption
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 external
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 federatedfilesharing
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 federation
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_external
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_pdfviewer
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_sharing
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_texteditor
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_trashbin
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_versions
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 files_videoplayer
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 firstrunwizard
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 gallery
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 notifications
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 provisioning_api
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 systemtags
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 templateeditor
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 updatenotification
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 user_external
drwxrwxr-x. apache apache system_u:object_r:httpd_sys_content_t:s0 user_ldap
[/code]
The problem exists with all 3 underdirectories. Dont want to change context. Someone can help me ? Owncloud doesn't want to works fine becouse doesn't have a premission to save in data,apps and config undercategories.
Thank u !
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
