Update from 8.0.3.->8.2.9. works local, but not on productive system

help

#1

Hello Forum,

I tried to upgrade my owncloud 8.0.3. to version 8.2.9. on a testing environment (local webserver with macports) where everything worked fine. The Updater started and made all the necessary changes. When I do the same procedure on the production server (Ubuntu 14.04 LTS), I always get an Server Error 500. When I look into the owncloud.log, it seems that there are missing classes. I don´t understand that behaviour, because in that testing enviroment I used an exact copy of the production system. Did anyone have similar problems or can help me to get the update working? Thanks

regards, Dominik


#2

How did you update?

Did you directly update from 8.0.x to 8.2.x?


#3

Hello Victor,

yes I did. I removed everything except config/ and data/ and moved the new files at the same place.

Regards


#4

direct updates are not supported, you have to upgrade every single major-version in between.

so the correct steps are:
8.0.x -> 8.1.x -> 8.2.x

what version do you have in your config.php?


#5

My fault, the currect Version is 8.1.3.0. So I didn´t update two major versions, but the question why it works in testing enviroment remains. Thx

Regards


#6

could you please provide us the exact steps you've been using to upgrade your instance, step by step?

and, if possible, provide us your current apache-config (etc/apache2/sites-enabled/owncloud.conf).

as you said, you have an EXACT copy of your environment, i hope you didnt forget to change DNS and IP-addresses :smile:


#7

Here´s my Apache Config:

000-default.conf:
<VirtualHost *:80>
ServerName	xxx.x.xx.xxx:80
ServerAdmin	admin@domain.tld
DocumentRoot	/var/www/owncloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /owncloud /var/www/owncloud
   <Directory /var/www/owncloud/>
	Options FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        Allow from all
        Satisfy Any
   </Directory>
</VirtualHost>

default-ssl.conf:
NameVirtualHost *:443
<VirtualHost *:443>
    ServerName	xxx.x.xx.xxx:443
    ServerAdmin	admin@domain.tld
	DocumentRoot	/var/www/owncloud
    ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
	
SSLEngine On
SSLCertificateFile      /etc/ssl/certs/ssl-cert-xxx.crt
SSLCertificateKeyFile	/etc/ssl/private/ssl-cert-xxx.key
</VirtualHost>

My Update steps were no magic, I removed everything in "var/www/owncloud/" except "config/config.php" & "data/". After that I pasted the new files from the 8.2.9 archive and called the webinterface (the "config/" has not been overwritten with an empty one). The owncloud install recognized that it needs a update (apps, db, and so on), so I pressed "Start the updater" or whatever the button was called. After that everything was fine, in the test enviroment. I repeated those steps on the server - with a result of Error 500.

Regards

P.S.: I just changed the DNS and IP settings on my test enviroment after I copied the files, on the server everything stayed the same. I also didn´t copy anything back from the test enviroment, so everything should be fine with my DNS and IP settings.


#8

did you do:

chown -R www-data:www-data /path/to/owncloud

?


#9

Yes, I had to change the owner, before removing the files and pasting the new. After that I used this script, to set the ownership and right back:

#!/bin/bash
ocpath='/var/www/owncloud'
htuser='www-data'
htgroup='www-data'
find ${ocpath}/ -type f -print0 | xargs -0 chmod 0640
find ${ocpath}/ -type d -print0 | xargs -0 chmod 0750
chown -R root:${htuser} ${ocpath}/
chown -R ${htuser}:${htgroup} ${ocpath}/apps/
chown -R ${htuser}:${htgroup} ${ocpath}/config/
chown -R ${htuser}:${htgroup} ${ocpath}/data/
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
chown root:${htuser} ${ocpath}/.htaccess
chown root:${htuser} ${ocpath}/data/.htaccess
chmod 0644 ${ocpath}/.htaccess
chmod 0644 ${ocpath}/data/.htaccess

#10

thats odd, I dont see what you did wrong in the first place.

how about removing the default-configs and replace them with a new one?

as an example:

unlink /etc/apache2/sites-enabled/000-default.conf

nano /etc/apache2/sites-enabled/owncloud.conf

<VirtualHost *:80>
		#### Redirect to port 443 ###
		RewriteEngine on 
		ReWriteCond %{SERVER_PORT} !^443$
		RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]

		#### End of Redirection configuration ###
		ServerName yourdomain.ch
		ServerAdmin admin@yourdomain.ch
		DocumentRoot /var/www/owncloud
<Directory /var/www/owncloud>
		Options +FollowSymlinks
		AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
</VirtualHost>

<VirtualHost *:443>
		####Configuration for SSL #####
		SSLEngine on
		SSLCertificateFile /etc/apache2/ssl/.yourcert.crt
		SSLCertificateKeyFile /etc/apache2/ssl/.yourkey.key
		SSLCertificateChainFile /etc/apache2/ssl/rapidssl_intermediate.crt
		#### End of SSL Configuration ####

		ServerName yourdomain.ch
		ServerAdmin admin@yourdomain.ch
		Header always add Strict-Transport-Security "max-age=15768000"
		ErrorLog ${APACHE_LOG_DIR}/error.log
		CustomLog ${APACHE_LOG_DIR}/access.log combined
		DocumentRoot /var/www/owncloud/
<Directory /var/www/html/owncloud>
		Options +FollowSymlinks
		AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud
</Directory>
</VirtualHost>

maybe this helps?


#11

Thanks for your help. I´ll try this later today.

Regards, Dominik