ownCloud 8.2.4 to 9.0.2 upgrade problem
-
Decided to try and upgrade a client with an ownCloud install running 8.2.4.
The system is a CentOS 7 minimal install in a Hyper-V VM.
This install is still using PHP 5.4 (defualt for CentOS 7).
There are not good instructions for this process because of the break out of the repository to
owncloud
andowncloud-files
.First went to get the new repository information.
http://download.owncloud.org/download/repositories/9.0/owncloud/
Following those instructions I installed the repository.rpm --import https://download.owncloud.org/download/repositories/9.0/CentOS_7/repodata/repomd.xml.key wget http://download.owncloud.org/download/repositories/9.0/CentOS_7/ce:9.0.repo -O /etc/yum.repos.d/ce:9.0.repo yum clean expire-cache
Then before I tried to install/update I disabled the 8.2 repository.
nano /etc/yum.repos.d/ce:8.2.repo
Change enabled to 0.
enabled=0
Now, I ran yum update and found a problem. It was only installing
owncloud-files
. It was not going to upgrade ownCloud itself. WTF?[root@owncloud yum.repos.d]# yum update Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 beats | 2.9 kB 00:00:00 ce_9.0 | 1.2 kB 00:00:00 epel/x86_64/metalink | 13 kB 00:00:00 extras | 3.4 kB 00:00:00 updates | 3.4 kB 00:00:00 Loading mirror speeds from cached hostfile * base: repos.dfw.quadranet.com * epel: mirror.oss.ou.edu * extras: mirror.sesp.northwestern.edu * updates: mirror.raystedman.net Resolving Dependencies --> Running transaction check ---> Package owncloud.noarch 0:8.2.4-1.1 will be obsoleted ---> Package owncloud-config-apache.noarch 0:8.2.4-1.1 will be obsoleted ---> Package owncloud-files.noarch 0:9.0.2-1.1 will be obsoleting ---> Package owncloud-server.noarch 0:8.2.4-1.1 will be obsoleted --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================ Installing: owncloud-files noarch 9.0.2-1.1 ce_9.0 23 M replacing owncloud.noarch 8.2.4-1.1 replacing owncloud-config-apache.noarch 8.2.4-1.1 replacing owncloud-server.noarch 8.2.4-1.1 Transaction Summary ================================================================================================================================ Install 1 Package Total download size: 23 M Is this ok [y/d/N]: n Exiting on user command
So I tried the install command instead. That seemed to get everything.
[root@owncloud yum.repos.d]# yum install owncloud Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: repos.dfw.quadranet.com * epel: mirror.oss.ou.edu * extras: bay.uchicago.edu * updates: mirror.raystedman.net Resolving Dependencies --> Running transaction check ---> Package owncloud.noarch 0:8.2.4-1.1 will be updated ---> Package owncloud.noarch 0:9.0.2-1.1 will be an update --> Processing Dependency: owncloud-deps >= 9.0.2 for package: owncloud-9.0.2-1.1.noarch --> Processing Dependency: owncloud-files >= 9.0.2 for package: owncloud-9.0.2-1.1.noarch --> Running transaction check ---> Package owncloud.noarch 0:8.2.4-1.1 will be obsoleted ---> Package owncloud-config-apache.noarch 0:8.2.4-1.1 will be obsoleted ---> Package owncloud-deps-php5.noarch 0:9.0.2-1.1 will be installed ---> Package owncloud-files.noarch 0:9.0.2-1.1 will be obsoleting ---> Package owncloud-server.noarch 0:8.2.4-1.1 will be obsoleted --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================ Installing: owncloud-files noarch 9.0.2-1.1 ce_9.0 23 M replacing owncloud.noarch 8.2.4-1.1 replacing owncloud-config-apache.noarch 8.2.4-1.1 replacing owncloud-server.noarch 8.2.4-1.1 Updating: owncloud noarch 9.0.2-1.1 ce_9.0 4.0 k Installing for dependencies: owncloud-deps-php5 noarch 9.0.2-1.1 ce_9.0 7.2 k Transaction Summary ================================================================================================================================ Install 1 Package (+1 Dependent package) Upgrade 1 Package Total download size: 23 M Is this ok [y/d/N]: y
The yum process completed and I then ran the occ upgrade commands.
[root@owncloud ~]# cd /var/www/html/owncloud [root@owncloud owncloud]# sudo -u apache php occ maintenance:mode --off 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 Maintenance mode disabled [root@owncloud owncloud]# [root@owncloud owncloud]# sudo -u apache php occ upgrade 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 <snip stuff> Starting code integrity check... Finished code integrity check Update successful Turned off maintenance mode Reset log level
I went to the URL and was greeted by this
I checked the config.php in the owncloud folder first. Everything there was correct.
So I then checked the Apache owncloud.conf and found the problem.
# /etc/httpd/conf.d/owncloud.conf Alias /owncloud "/var/www/html/owncloud/owncloud/" <Directory "/var/www/html/owncloud/owncloud"> Options +FollowSymLinks AllowOverride All <IfModule mod_dav.c> Dav off </IfModule> SetEnv HOME /var/www/html/owncloud/owncloud SetEnv HTTP_HOME /var/www/html/owncloud/owncloud </Directory> <Directory "/var/www/html/owncloud/owncloud/data/"> # just in case if .htaccess gets disabled Require all denied </Directory>
Ummm, WTF is that. I removed all the extra
/owncloud
and then restarted httpdsystemctl restart httpd
and then everything came back up.
But, I would like to point out that the data directory in the apache conf file is wrong also.
My config.php points here
'datadirectory' => '/home/owncloud/data',
-
This was a known bug in 9.0.1 and marked as fixed for 9.0.2...
Ooops.
-
And problem resolved.
-
have you tested yet?
-
@scottalanmiller said in ownCloud 8.2.4 to 9.0.2 upgrade problem:
have you tested yet?
I have more systems that I can upgrade, but I have not done so yet.