XF 2.1 One-click upgrades and add-on install/upgrade from ZIP files

And here we are, already at the penultimate entry in our "Have you seen...?" series for XF 2.1. If you haven't seen the previous entries about what's coming in XF 2.1, check them out here.

As ever, to ensure you're kept up to date, we strongly recommend giving that "Watch forum" link a... well... click, I guess... and make sure you enable email notifications if you haven't done so already 🙂
 

Chris D

XenForo developer
Staff member
Whether you have 25 million posts or 250 million posts of just 25 posts, the majority of upgrades will take the same amount of time.

Where this differs is if there are database updates to be made.

This doesn’t apply to most third point upgrades like 2.1.4.

Significant upgrades will always prompt you to use the CLI.
 

MariaJonesPIA

New member
I was looking for some XenForo upgrades guides on youtube but couldn't find anything except "How to install XenForo" I am finally here!! where are some proper advice, Thanks!
 

gerryvz

Well-known member
Hi folks, could someone point me to the proper CHMOD permissions for the upgrading functionality?

I have this:

The following issue was found when determining if a one-click upgrade is possible: Cannot install from archive as not all required directories are writable. Various directories must be writable by the web server user to install from an archive. In addition to the XF root directory, some or all of the following paths must be writable: js, src/addons, styles, src/XF/Repository/AddOn.php.
Cannot install from archive as not all required directories are writable. Various directories must be writable by the web server user to install from an archive. In addition to the XF root directory, some or all of the following paths must be writable: js, src/addons, styles, src/XF/Repository/AddOn.php.

how to resolve?
Is there a command we can run to fix permission issues?

Every time I go to upgrade an addon I get the dreaded



I have fixed permissions previously to run the "install/upgrade" and they seem to have reverted back.

Is there a command I can run to permanently resolve this?
The simplest way would be to find the user that PHP is running as and chown -R user * from the root of your XF installation. This will fix your issue.
That is the problem though. If the owner is not the same as the user which PHP runs as then owner will not work. It really is a maze which is not simple.
I had this issue for some time, and finally resolved it. Running Ubuntu 18.04.3 on a VPS, XF 2.1.6 currently.

@Deebs is correct -- you need to determine what user/group that php and whatever web server you are using (Apache, nginx, etc.) are running as, and ensure that the user and groups of your forum are the same. My VPS was set up (from when I originally installed it) with php and Apache being in the root owner/group, when instead it should have been www-data for both. My XF install was set up with a different owner/group.

Some simple work with the chown command enabled me to change the owner/group of all of those directories to ensure their alignment, and so that php can write directly to the forum root.

DO NOT use 777 (writable by anyone) as the solution for this, as this is highly insecure. 775 generally is the better way to go for permissions, or 664.
 
Top