Nextcloud version: 18.0.7
Operating system and version: Ubuntu 20.04
Apache or nginx version: Apache2 2.4.41-4ubuntu3
PHP version: 7.4.3
I am working on bringing my old Nextcloud 15 installation to a current level. Updates to 16 and then to 17.0.8 have succeeded. The update to 18.0.7 is failing on the occ-upgrade-stage:
root@web:/var/www/owncloud# sudo -u www-data php occ upgrade
An unhandled exception has been thrown:
Exception: Could not acquire a shared lock on the config file /var/www/owncloud/config/config.php in /var/www/owncloud/lib/private/Config.php:211
Stack trace:
#0 /var/www/owncloud/lib/private/Config.php(64): OC\Config->readData()
#1 /var/www/owncloud/lib/base.php(145): OC\Config->__construct()
#2 /var/www/owncloud/lib/base.php(582): OC::initPaths()
#3 /var/www/owncloud/lib/base.php(1089): OC::init()
#4 /var/www/owncloud/console.php(48): require_once('/var/www/ownclo...')
#5 /var/www/owncloud/occ(11): require_once('/var/www/ownclo...')
I have followed the Nextcloud doc for manual upgrading: Rename old directory, extract zip into new directory, copy config.php and /data, run chown, then run occ upgrade - which is where the above error now occurs.
config.php /var/www/owncloud/config:
$CONFIG = array (
'instanceid' => '51f6b97ddcbb5',
'passwordsalt' => '66519407bad8c2062e9f66cddb0199',
'datadirectory' => '/var/www/owncloud/data',
'dbtype' => 'mysql',
'version' => '17.0.8.1',
'dbname' => 'owncloud',
'dbhost' => 'db.example.com',
'dbtableprefix' => 'oc_',
'dbuser' => 'dbuser',
'dbpassword' => 'dbpassword',
'installed' => true,
'loglevel' => '1',
'log_rotate_size' => 10485760,
'theme' => '',
'maintenance' => false,
'trusted_domains' =>
array (
0 => 'www.example.com',
1 => '192.168.1.103',
),
'share_folder' => '/Shared',
'mail_domain' => 'example.com',
'mail_from_address' => 'noreply',
'mail_smtpdebug' => false,
'mail_smtpmode' => 'smtp',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
),
'logtimezone' => 'Europe/Berlin',
'overwrite.cli.url' => 'https://www.example.com/owncloud',
'secret' => 'verysecret',
'trashbin_retention_obligation' => 'auto',
'updatechecker' => false,
'updater.server.url' => 'https://updates.nextcloud.org/server/',
'updater.release.channel' => 'stable',
'htaccess.RewriteBase' => '/owncloud',
'versions_retention_obligation' => 'auto, 90',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'mail.example.com',
'mail_smtpport' => '25',
'mail_smtpname' => 'noreply@example.com',
'mail_smtppassword' => 'password',
);
root@web:/var/www/owncloud/config# ls -la
total 107
drwxr-x--- 2 www-data www-data 6 Jul 19 17:05 .
drwxr-x--- 14 www-data www-data 28 Jul 19 17:06 ..
-rw-r----- 1 www-data www-data 495 Jul 15 22:01 .htaccess
-rw-r----- 1 www-data www-data 0 Jul 15 22:01 CAN_INSTALL
-rw-r----- 1 www-data www-data 1650 Jul 19 17:05 config.php
-rw-r----- 1 www-data www-data 54880 Jul 15 22:01 config.sample.php
I’m a bit lost as to what the root cause might be. Any help/pointers would be appreciated!