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

XF 1.4 Cannot Install (data + internal_data cannot write)

Discussion in 'Installation, Upgrade, and Import Support' started by Solistika, Dec 10, 2015.

  1. Solistika

    Solistika Member

    I've installed Xenforo a few times in the past, I'm stuck though, I can't figure this dumb problem out.

    Trying to install, get the "data and internal_data must be writable."
    http://take.ms/SjHcb
    They are...
    http://take.ms/ecqbu

    I've deleted the files and re-uploaded about 6 times now, and I've even tried to install version 3.1 just to test it. Same issue.

    I'm changing the permissions recursively, I've tried remaking the data and internal_data folder, I've restarted the server and associated services, over and over, 50 different ways to test everything.
    This should be such a simple fix, by just changing the permissions, and it's not working.

    Now what?
    Any help please is appreciated!

    I am trying to install on Centos 7 x64
     
    Last edited: Dec 10, 2015
  2. Solistika

    Solistika Member

    I've even tried making the entire xenforo directory 777, makes no difference.
     
  3. Martok

    Martok Well-Known Member

    So your installing the site into a folder called X in your root?

    Are you sure you have set the correct path(s) in the install steps?
     
  4. Solistika

    Solistika Member

    I can leave it named 'upload' if that is really crucial to it.

    I don't want it as my main page, so I put it in a sub-directory to my html directory.

    http://take.ms/iGglH
    http://take.ms/SYlcz

    Yes.
     
    Last edited: Dec 10, 2015
  5. Solistika

    Solistika Member

    In the mean time I'm checking every possible source for info on this issue. I have a feeling it's a simple goofy mistake I'm making, but it's not obvious to me.
     
  6. Brogan

    Brogan XenForo Moderator Staff Member

    It's unlikely but it could be an ownership issue, so you can try chown'ing too.

    Typically though, it's just a case of uploading the files and chmod'ing the two directories.
     
    Robust likes this.
  7. Solistika

    Solistika Member

    Thanks for replying Brogan,

    I've tried chown'ing them to myself (non-root user with root access), and I've tried setting them to root as well to see if that would help.
    Neither made a difference.
     
  8. Solistika

    Solistika Member

    Could it be like a permission issue with another part of the server? Like Apache?
    Might be non-xenforo related, but just trying to brainstorm other possible hangups.
     
  9. Brogan

    Brogan XenForo Moderator Staff Member

    It has to be something to do with the server set up, but I'm not entirely sure what.
     
  10. Solistika

    Solistika Member

    I will say that in the past, I've always used Centos 6, and this is the first time I'm using Centos 7 for a web server.
    I'm hosting my website in /var/www/html
    I'm trying to host Xenforo in /var/www/html/Xenforo

    So currently I'm uploading directly to /var/www/html and seeing if that makes a difference being in a directory back.
    I expect this to make no difference, but worth a shot.

    Edit: Same error
     
  11. Mike

    Mike XenForo Developer Staff Member

    It's probably SELinux related. Totally baffled as to why you'd be installing XF 1.3.1 though...
     
    Chris D, Solistika and Robust like this.
  12. Robust

    Robust Well-Known Member

    There's literally a 99% chance of it being the following, already mentioned by @Brogan and @Mike respectively:
    • chown the files to the web user, not your user, not root, to the web process user
    • Disable or correctly configure (just disable tbh) SELinux
     
    Solistika likes this.
  13. Solistika

    Solistika Member

    Well I was going to do 1.4, was having issues, thought I'd test with 1.3 to see if different. Just trying to narrow down the problem.
    I even tried installing myBB and it gave me similar errors, it was unable to write on specific folders.

    Ok this is where I'm a tad bit less knowledgable, I've tried setting it to the web user, and it says user doesn't exist. So do I need to make a web user? Then give it some permissions or just leave it at that? This is most likely my hang-up.
     
  14. Robust

    Robust Well-Known Member

    Then you don't know your web user. Some common names to try:
    • www-data
    • nginx
    • http
    • apache/apache2

    If none, what's your web server? Refer to your configs for the right username.

    chown -R user:group(user) path
    e.g. chown -R nginx:nginx /var/www/html
     
    Solistika likes this.
  15. Chris D

    Chris D XenForo Developer Staff Member

    Well before diving into all that, is SELinux enabled?
     
    Solistika likes this.
  16. Solistika

    Solistika Member

    So I have since...
    - Wiped the server and started over
    - Discovered 'apache' is my user thanks to your comment
    - Set apache as the owner and group of my /var/www/html directory
    - Ensured data & internal_data have full permissions (777)

    Status - Same exact state. Website loads fine, Xenforo claims it cannot access data and internal_data.

    I've never setup or needed to setup SELinux during my previous Xenforo installations.
    I can look into it if needed, sounds like it may be.
     
  17. Solistika

    Solistika Member

    I was able to figure it out with this, you give me insight to where I needed to look!

    So SELinux was enabled, and was actually getting in the way of what was going on.
    Here's what I did to fix it...

    I already had set apache as the owner and the group of the directories.
    Then I allowed SELinux to serve files off Apache
    Code:
    sudo chcon -t httpd_sys_content_t /var/www/html/Forums/ -R
    Then I allowed writing to specific directories that it needed to.
    Code:
    sudo chcon -t httpd_sys_rw_content_t /var/www/html/Forums/data -R
    sudo chcon -t httpd_sys_rw_content_t /var/www/html/Forums/internal_data -R
    Thanks for your help on this guys, wouldn't have found a fix as quickly without ya!
    Currently installing Xenforo, no issues :)
     
    Robust and Chris D like this.
  18. Brogan

    Brogan XenForo Moderator Staff Member

    Chris D likes this.
  19. Solistika

    Solistika Member

    You were all kinda hinting at that and I wasn't paying the best attention, was trying to stick to troubleshooting stuff I knew I guess :p
    Glad I took the time to come to you guys though, worth every penny!
     
    Robust likes this.

Share This Page