New server...new problem


#1

I'm moving servers and need some extra help on one small thing: permissions seem messed up with the ownCloudDataDirectory. I literally pulled the HDDs from my old server and put them in my new server and copied some things over. My data folder is on these HDDs that moved over; however, I've ran into other issues with the Apache version being different on Centos 7 from Centos6.

I'm currently getting the following error message:

Data directory (/Path/To/ownCloudDataDir/) not writable by ownCloud
Permissions can usually be fixed by giving the webserver write access to the root directory.

Here's my questions (all related to what the problem may be):

Question 1 - On the hard drives, when I do a ls -laZ, I get this:

drwxr-x---. apache apache unconfined_u:object_r:httpd_sys_content_t:s0 ownCloudDataDir

If I try to chown this with

chown -Rv apache:apache ownCloudDataDir

I get lots of ownwership retained messages in the output. Is the apache user on my old computer the same as the apache user on my new computer? Or do I need to change it to a 3rd party then back to apache on the new computer?

Question 2 - Or do you think the problem is related to the new "Require all granted" required in Apache 2.4.3+? Do I need to add something special to have apache see the ownCloudDataDir as accessable since it is outside of the normal document root?

I'll post more information if you need/want it, but I'm out of ideas. It doesn't look like permissions exactly...nor does it look like an SELinux problem. I also will reemphasize that these disks and this config were working in my old server...I physically moved the disks to the new computer, setup apache, mysql, and am here.


#2

Turns out it was an SELinux issue. Making sure that the types were configured correctly got it working.

https://doc.owncloud.org/server/latest/admin_manual/installation/selinux_configuration.html gives a list of the correct types and directories.