XF 1.5 Unable to upgrade board (directories not writable, yet 777?)

jflory7

Active member
Hello,

Today I tried upgrading my board to 1.5.2 and ran into a strange issue.
The following errors occurred while verifying that your server can run XenForo:
  • The directory /var/www/crystalcraftmc.com/public_html/data must be writable. Please change the permissions on this directory to be world writable (chmod 0777). If the directory does not exist, please create it.
  • The directory /var/www/crystalcraftmc.com/public_html/internal_data must be writable. Please change the permissions on this directory to be world writable (chmod 0777). If the directory does not exist, please create it.
Please correct these errors and try again.

I have double-checked that my permissions are correct, and I have set 777 recursively for both directories.
Code:
$ ls -Alh
total 76K
drwxrwxrwx.  7 jflory apache   96 Oct 11 20:19 data
drwxrwxrwx.  6 jflory apache 4.0K Jul 19 02:57 internal_data

I'm confused as to what could have possibly happened on my system to prevent these directories from becoming unwritable… does anyone have any potential ideas for a solution? I am running my machine on a RHEL 7 server (no web hosts). I'm confused as how to troubleshoot this further.

Thanks in advance!


Cheers,
- jflory7​
 
You mentioned SELinux in the previous thread. This is almost certainly the issue.

The error is coming direct from the file system saying that those directories aren't writable.
 
You mentioned SELinux in the previous thread. This is almost certainly the issue.

The error is coming direct from the file system saying that those directories aren't writable.
Okay, I did more research into this, and yes, it was SELinux, and the easy fix is to just turn it off, but that's not something I wanted to do. Setting it to permissive to fix a problem is unwise and leaves a machine more vulnerable than it would be otherwise.

Ultimately, I discovered that I needed to relabel the directories with a different label as noted by this BugZilla ticket for RHEL. I ran the following commands to recursively relabel the directories needed by XenForo:
Code:
# chcon -Rv --type=httpd_sys_rw_content_t data/
# chcon -Rv --type=httpd_sys_rw_content_t internal_data/
After relabeling and restarting Apache, regular functionality was restored and I was able to upgrade.

Hopefully this can help someone else down the line with a similar issue.
 
Back
Top Bottom