OwnCloud Upgrade to 8.1.4

Seems like again upgrading OwnCloud was not as easy as I thought it was going to be. Here are the error messages and how I got around them.

File Permissions
My file permissions were again reset to root and without visibility. I ran the following to get the directory back in the correct state. Of course, you can first run an ls to make sure they files and directory are in bad state, but this will not hurt.

$ cd /var/www/owncloud
$ sudo chown -R www-data:www-data *
$ sudo chmod -R 755 *

OCC Status
The occ tool is great in helping to debug this situation. You need to run it was the www-data user and that is described below.

$ cd /var/www/owncloud
$ sudo -u www-data bash -c './occ status'

Error message from occ status:

ownCloud or one of the apps require upgrade – only a limited number of commands are available

Missing memcache class \OC\Memcache\APCu for local cache

Memory Cache
If you remember in a previous post about Owncloud 8.1 Security and Setup warnings, we default with memory cache issues. Well, we need to do it once again since the first time was not enough.

$ sudo vim /etc/php5/cli/php.ini

Add the 2nd statement to your php.ini after the 1st statement, which should already be in the file.


Restart Server
This process is going to be a little weird so check the sources below for how gobstopper figured it out. I added a final maintenance:mode --off to get the server back up along with two occ upgrade because nsrosenqvist said the second one always works. Crazy right!

$ sudo -u www-data ./occ maintenance:mode --off
$ sudo -u www-data ./occ upgrade
$ sudo -u www-data ./occ upgrade
$ sudo -u www-data ./occ maintenance:repair
$ sudo -u www-data ./occ maintenance:mode --off

Error between 1st and 2nd occ upgrades:

Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route “contacts_index” as such route does not exist.
Update failed

Re-enable Apps:
As always, you now can visit your webpage but you will need to re-enable the apps since they all got disabled. I actually got the upgrade dialog on the website again, but decide to run the upgrade through the following command and it worked.

$ sudo -u www-data ./occ upgrade


This entry was posted in How-To, Nextcloud/OwnCloud and tagged , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s