1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'Troubleshooting and Problems' started by jflory7, Oct 20, 2015.

  1. jflory7

    jflory7 Active Member


    Today I tried upgrading my board to 1.5.2 and ran into a strange issue.
    I have double-checked that my permissions are correct, and I have set 777 recursively for both directories.
    $ 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!

    - jflory7​
  2. Mike

    Mike XenForo Developer Staff Member

    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.
  3. jflory7

    jflory7 Active Member

    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:
    # 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.

Share This Page