Problems with SELinux and Owncloud 9.1

OK, not so happy now. I did get apache to access the /home/userdir but, I am trying to run owncloud in /home/cloud/public_html. Everything works fine until I setenforce 1 again. As instructed via Owncloud server setup instructions here is what I have done:

1. setenforce 0 semanage fcontext -a -t httpd_sys_rw_content_t '/home/cloud/public_html/data(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/home/cloud/public_html/config(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/home/cloud/public_html/apps(/.*)?' semanage fcontext -a -t httpd_sys_rw_content_t '/home/cloud/public_html/.htaccess' semanage fcontext -a -t httpd_sys_rw_content_t '/home/cloud/public_html/.user.ini' restorecon -Rv '/var/www/html/owncloud/'

However, once I setenforce back to 1 I get a white page. Running this

ls -Z /home/cloud/public_html/config (or any other directory)[/code] I get the following:[code]-rw-r-----. apache apache system_u:object_r:httpd_sys_rw_content_t:s0 config.php

Log entries: [Fri Dec 28 01:24:34.649662 2018] [:error] [pid 28652] [client 10.1.4.50:62148] PHP Fatal error: Uncaught exception 'Doctrine\\DBAL\\DBALException' with message 'Failed to connect to the database: An exception occurred while executing 'PRAGMA journal_mode = WAL':\n\nSQLSTATE[HY000]: General error: 14 unable to open database file' in /home/backups/public_html/lib/private/DB/Connection.php:58\nStack trace:\n#0 /home/backups/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(973): OC\\DB\\Connection->connect()\n#1 /home/backups/public_html/lib/private/DB/Connection.php(209): Doctrine\\DBAL\\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)\n#2 /home/backups/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(621): OC\\DB\\Connection->executeUpdate('PRAGMA read_unc...')\n#3 /home/backups/public_html/lib/private/DB/Connection.php(141): Doctrine\\DBAL\\Connection->setTransactionIsolation(2)\n#4 /home/backups/public_html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\\DB\\Connection->__construct(Array, Object(Doctrine\\DBAL\\Driver\\PDOSqlite\\Driver), Object(Doctrine\\D in /home/backups/public_html/lib/private/DB/Connection.php on line 58
Any suggestions

Hey,

this looks to me that you need some knowledge on how to debug and correctly configure SELinux on your installation. Maybe there are some tutorials on this available on the internet?

I’m not sure if you can find many users with SELinux knowledge in this forums, if no one is able to help in the next few days it might be required that you ask this question on forums providing support for your operating system.

After setting up SELinux to allow apache access to my home directory, I used the instructions from the ownCloud 9.1 Server Administration Manual on the doc.owncloud.org website.