Occ upgrade is not defined

Steps to reproduce

  1. try to upgrade to version 10.0.9 from 10.0.6 as suggested. I followed the advised steps
  2. remove all owncloud directory content but keep data and config directories
    3.download the latest 10.0.9.tar.gr file from the web site and extracted it
  1. I try to run :
    root@data:~# cd /var/www/owncloud
    root@data:/var/www/owncloud# sudo -u www-data php occ upgrade
    ownCloud is not installed - only a limited number of commands are available

Command “upgrade” is not defined.

Expected behaviour

occ exists but most of commands are inactive. This is surprising since I have just extracted the tar.gz files

Actual behaviour

Nothing happens; I finally got 10.0.6 from debian packages (installation workds but the 10.0.9 is not available)

Server configuration

Operating system:
debian
Web server:
apache 2.4
Database:

PHP version:
PHP 5.6.36-0+deb8u1 (cli) (built: Jun 26 2018 17:31:29)

ownCloud version: (see ownCloud admin page)
10.0.6

Updated from an older ownCloud or fresh install:
Update from several 9.x versions

Where did you install ownCloud from:
first install from debian package, but this tries is from the downladed file owncloud-10.0.9.tar.bz2

Hey,

could it be possible that your ownCloud in installed at another location then /var/www/owncloud? This could explain why the occ command says “ownCloud is not installed”.

Did you check/adjust the ownership of the extracted files and directories?

I think (not sure), it is missing the config.php file. So the suspicion of @tom42 might be true.

1 Like

Thanks for all your anwsers !

However

  1. the default location is used /var/www/owncloud
  2. the config file is here and readable : moreover the owncloud service is working fine and is accessible, it is only the occ command
  3. I tried to force the chown -R www-data:www-data . but same result and to force +r on config.php

root@data:/var/www/owncloud/config# chmod +r config.php
root@data:/var/www/owncloud/config# ls -al
total 60
drwxrwxrwx 2 www-data www-data 4096 Jul 16 16:13 .
drwxr-xr-x 13 www-data www-data 4096 Jul 16 16:14 …
-rw-r–r-- 1 www-data www-data 0 Jul 15 13:07 config.php
-rw-r–r-- 1 www-data www-data 47924 Jul 16 16:13 config.sample.php
-rwxrwxr-- 1 www-data www-data 105 Jul 17 16:42 disable-updatechecker.config.php
root@data:/var/www/owncloud/config# cd …
root@data:/var/www/owncloud# sudo -u www-data php occ upgrade
ownCloud is not installed - only a limited number of commands are available

Command “upgrade” is not defined.

If no idea to lot loose too much time with this since it is working fine, it is just the upgrade script in db which was not applied form 10.0.6 to 10.0.9 but not sure this is really causing any issue

OK he was right : the config file was here but was overriden by the tar exctraction … The installation says to keep the data and the config directory but this is not enough to keep. After tar extraction you need to override the files with the one of the former version in the backup of owncloud.

Now this seems to work
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
2018-08-03T08:33:09+00:00 Set log level to debug
2018-08-03T08:33:09+00:00 Turned on maintenance mode
2018-08-03T08:33:09+00:00 Repair step: Repair MySQL database engine
2018-08-03T08:33:09+00:00 Repair step: Repair MySQL collation
2018-08-03T08:33:09+00:00 Repair info: All tables already have the correct collation -> nothing to do
2018-08-03T08:33:09+00:00 Repair step: Repair SQLite autoincrement
2018-08-03T08:33:09+00:00 Repair step: Repair orphaned reshare
2018-08-03T08:33:09+00:00 Repair step: Repair duplicate entries in oc_lucene_status
2018-08-03T08:33:09+00:00 Repair info: lucene_status table does not exist -> nothing to do
2018-08-03T08:33:09+00:00 Repair step: Upgrade app code from the marketplace
2018-08-03T08:33:09+00:00 Repair info: Using market to update existing apps
2018-08-03T08:33:09+00:00 Repair info: Attempting to update the following missing apps from market: gallery, templateeditor
2018-08-03T08:33:09+00:00 Repair info: Fetching app from market: gallery
2018-08-03T08:33:12+00:00 Repair info: Fetching app from market: templateeditor
2018-08-03T08:33:14+00:00 Repair info: Attempting to update the following existing compatible apps from market: gallery, templateeditor
2018-08-03T08:33:14+00:00 Repair info: Fetching app from market: comments

The tarballs usually don’t contain a file named config.php.

1 Like

Remove comment (my mistake)