XF 2.1 2.1.3 upgrade issue: Files not writeable

djbaxter

in memoriam 1947-2022
On two separate forums (different dedicated servers), getting this error:

The following issue was found when determining if a one-click upgrade is possible: The files are not writable.

The upgrade manual says two directories must be 0777: data and internal_data

Both of these are already 0777 on both forums.

What else would produce this error? or what other directories need to be changed?
 
Only that script can tell you what php runs as. My best guess would be apache if you have cPanel and nginx if you're running nginx.

Try both as it won't harm anything.
 
While those directories may be 0777, there might be a sub directory that's not.* Edit: I don't think this matters and chown is the only way if I recall correctly from a beta to another beta.

Run
chown -R user:user /path/to/data
and
chown -R user:user /path/to/internal_data

After that, an automatic update should work.

Do also:
chown -R user:user /path/to/install

after this do
chmod -R 777 /path/to/install chmod -R 777 /path/to/internal_data chmod -R 777 /path/to/data

install your upgrade.

Then, for securityreasons do:
chmod -R 775 /path/to/install chmod -R 775 /path/to/internal_data chmod -R 775 /path/to/data
 
I'm unsure at the moment if this one is necessary. But, I followed @eva2000 's guide for CMM to prevent it from locking down again.

I don't have the bookmarks with me to link.

But, I can say, if you're on a VPS without CMM then you probably should be; get outside your comfort zone a bit, it is very lightweight with a text based "GUI" that can make a 1vCPU run way more efficiently.

Hopefully he can write a guide (or link to one) for 2.1 and CMM with mod_pagespeed and memcache cause it'll do wonders for your site! :)
 
On my ubuntu 18.04 the owner is www-data

I had this setup so that I could ftp files to this location so the owner was <mylocaluser>:www-data

when I ran sudo chown -R www-data:www-data *

no longer had the problem with the upgrade...

Hope it helps
Bumping this as it worked for me, and I'm adding more details since this is surprisingly poorly documented.

Some details about my setup:
  • Ubuntu 20.04.03 LTS
  • I tried to keep most settings vanilla as possible
  • Trying to upgrade to Xenforo 2.2.9 - had the typical files not writeable error, pointing to an html page that basically said to just do it manually
  • I run my own server on AWS EC2, full control of the machine
  • php script someone provided earlier in this thread to determine user did not work for me (just displayed a blank page, and I'm still not sure why)
  • I was able to see/execute an info.php page that was part of my installation, and saw that like CT-Parents, the php owner is www-data (surely there's another way to find this info in a config file somewhere?
    • Actually, I just grepped for www-data while running "ps" and it showed a ton of apache2 processes running as that user, so basically a "ps auwxx |grep apache2" could lead you to the right answer here
  • Anyhow, after checking all that, I popped into the Xenforo subdirectory on my server, ran the sudo chown -R www-data:www-data * command as noted above
After doing all that, I was able to run the update from the admin GUI.
 
Back
Top Bottom