goldstift's 2 cent on technology and software development


Owncloud Updates between multiple Major Versions

In case you also come into this great situation "I upgraded my Ubuntu to 16.04 LTS and suddenly my owncloud installation is a mess", don’t panic. I’m about to share my mess with you so you can pick the perils.

It all started with Ubuntu 14.04LTS an innocent do-release-upgrade …​ which didn’t want to be aborted - twice. So it convinced to "yes, ok, let’s do it now…​". After the normal upgrade process and a reboot my system was back and working fine - I thought, until I noticed mails from my monitoring system, that the owncloud webUI wasn’t available.

Double checking confirmed "yes, the webUI is not available". And even after the hard part of fixing the nginx configuration - yes, I’m running owncloud behind nginx - and manually installing php7.0-fpm - did I mention Ubuntu 16.04 replaced php5 with php7 EXCEPT FOR THE FPM PART?! -, all websites worked, but Owncloud wouldn’t! Taking a very close look into nginx error.log and I suddenly noticed that the index.php was missing from /var/www/owncloud! In fact, it seems during the Ubuntu Upgrade process for an unreproducible reason all .php files in /var/www/owncloud got deleted! But hey, no worries, let’s apt-get install --reinstall! I double checked that my sources list was correctly pointing to owncloud stable for Ubuntu 16.04 (see and apt-get installed owncloud 9.1.3 on my machine without mentioning any problems.

Unfortunately my monitoring system was still unhappy. "Ah, of course, the 'manual upgrade' process", I thought, and ran sudo -u www-data /var/www/owncloud/occ upgrade only to get this wonderful output

ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
Maintenance mode is kept active
Reset log level

Opening the webUI had the same error message for me but additionally included a link to the immensely helpful which pointed out, that I had indeed skipped the 9.0 version!

Ok, let’s cut this short: It occurred to me that the owncloud team has no (documented) support for such a situation - at least I don’t consider helpful at all! I assume your next step was also to downgrade owncloud to the next minor version of your current release and by trying this, you jumped into the next fun situation that the owncloud-server package has a dependency on PHP5. IF SOMEONE CAN TELL ME WHY THIS IS CONSIDERED REASONABLE, I’M REALLY CURIOUS?

Anyway after reading through I finally came to this post which has a very interesting hint: The owncloud-files package has almost no depencies, is thus easy to downgrade and includes the updater! WOOHOO, JACKPOT!

So, I started by modifying my /etc/apt/sources.list.d/owncloud.list to Ubuntu 8.2

sh -c "echo 'deb /' > /etc/apt/sources.list.d/owncloud.list"

and then forcing the downgrade and step-by-step upgrade by running

$ sudo apt-get update && sudo apt-get install owncloud-files=8.2.9-1.1
$ sudo -u www-data /var/www/owncloud/occ upgrade
$ sh -c "echo 'deb /' > /etc/apt/sources.list.d/owncloud.list"
$ sudo apt-get update && sudo apt-get upgrade
$ sudo -u www-data /var/www/owncloud/occ upgrade
$ sh -c "echo 'deb /' > /etc/apt/sources.list.d/owncloud.list"
$ sudo apt-get update && sudo apt-get upgrade
$ sudo -u www-data /var/www/owncloud/occ upgrade

It took a while but worked pretty well. So in the end I’d like to thank John Orion for sharing his idea about owncloud-files and the owncloud team for providing this option - even though you don’t mention it on the pages where people are seeking for help. I hope this is helpful for others, struggling with upgrades.

Now I’m on to fix the remaining issues: Currently I’m facing a situation where all requests with index.php are returned with a HTTP302 redirect without index.php - which of course fails (e.g. /cloud/index.php/login is redirected to /cloud/login). NOTE: I’m running owncloud behind nginx with a contextroot other than /owncloud - as if I was asking for trouble, right? I’ll update this blog, in case I stumble upon something.

If you find anything to comment, optimize or fix about this, please leave me a github issue. Always think "If I have this issue, someone else might sooner or later have it, too" - and you can help that someone. Thanks a lot!

UPDATE: For those who want to follow along, I opened a Github issue under and provided a pull-request for the remaining necessary changes here

Go to "Owncloud Updates between multiple Major Versions"

Glassfish 4 on Nexus7

As you might have read in my previous blog post I'm currently doing Proof-Of-Concepts on what is possible with Java on a tablet like the Google Nexus7 device meaning a Nvidia Tegra chip which itself is an ARMv7 processor.

Thankfully there is a team at Ubuntu which dedicates its work to bringing a desktop linux to the tablet which supports the well-known standardized Java Runtime Environments out there.

Go to "Glassfish 4 on Nexus7"

Ubuntu and Java on Nexus7

In this blog post I describe how to setup Ubuntu Linux and Oracle Java on my newly acquired Google Nexus7 device. This shall be the foundation to checkout the things you can do with JavaFX on a Tablet computer.

My environment is a Macbook Pro (MBP) running on OS X 10.8 (Mountain Lion). The Nexus 7 (in my case the 16gb version) is attached to the MBP via its USB cable.

Go to "Ubuntu and Java on Nexus7"

My next Conferences