[SOLVED] Owncloud 9.1.4 to 10.0 upgrade errors

upgrade

#1

I'm running ownCloud 9.1.4 and today wanted to upgrade to 10.0 and followed the official upgrade documentation. Unfortunately this is what happend:

Steps to reproduce
1. Follow official upgrade instructions to set ownCloud to maintenance mode, stop webserver, and unpack 10.0 to my server.
2. Copy old config.php and data directory over to the new server.
3. Run occ upgrade

Expected behaviour
Normal upgrade process.

Actual behaviour
This is the output from the upgrade command:

An unhandled exception has been thrown:
Doctrine\DBAL\DBALException: Failed to connect to the database: An exception occured in driver: SQLSTATE[HY000] [14] unable to open database file in /srv/http/owncloud/lib/private/DB/Connection.php:63
Stack trace:
#0 /srv/http/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(992): OC\DB\Connection->connect()
#1 /srv/http/owncloud/lib/private/DB/Connection.php(211): Doctrine\DBAL\Connection->executeUpdate('PRAGMA read_unc...', Array, Array)
#2 /srv/http/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(623): OC\DB\Connection->executeUpdate('PRAGMA read_unc...')
#3 /srv/http/owncloud/lib/private/DB/Connection.php(146): Doctrine\DBAL\Connection->setTransactionIsolation(2)
#4 /srv/http/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DriverManager.php(172): OC\DB\Connection->__construct(Array, Object(Doctrine\DBAL\Driver\PDOSqlite\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#5 /srv/http/owncloud/lib/private/DB/ConnectionFactory.php(136): Doctrine\DBAL\DriverManager::getConnection(Array, Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))
#6 /srv/http/owncloud/lib/private/Server.php(461): OC\DB\ConnectionFactory->getConnection('sqlite3', Array)
#7 /srv/http/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#8 /srv/http/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('DatabaseConnect...')
#9 /srv/http/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('DatabaseConnect...')
#10 /srv/http/owncloud/lib/private/Server.php(1101): OC\ServerContainer->query('DatabaseConnect...')
#11 /srv/http/owncloud/lib/private/Server.php(226): OC\Server->getDatabaseConnection()
#12 /srv/http/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#13 /srv/http/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('UserManager')
#14 /srv/http/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserManager')
#15 /srv/http/owncloud/lib/private/Server.php(953): OC\ServerContainer->query('UserManager')
#16 /srv/http/owncloud/lib/private/Server.php(267): OC\Server->getUserManager()
#17 /srv/http/owncloud/lib/composer/pimple/pimple/src/Pimple/Container.php(113): OC\Server->OC\{closure}(Object(OC\Server))
#18 /srv/http/owncloud/lib/private/AppFramework/Utility/SimpleContainer.php(111): Pimple\Container->offsetGet('UserSession')
#19 /srv/http/owncloud/lib/private/ServerContainer.php(87): OC\AppFramework\Utility\SimpleContainer->query('UserSession')
#20 /srv/http/owncloud/lib/private/Server.php(970): OC\ServerContainer->query('UserSession')
#21 /srv/http/owncloud/lib/private/Server.php(977): OC\Server->getUserSession()
#22 /srv/http/owncloud/lib/base.php(586): OC\Server->getSession()
#23 /srv/http/owncloud/lib/base.php(994): OC::init()
#24 /srv/http/owncloud/console.php(57): require_once('/srv/http/owncl...')
#25 /srv/http/owncloud/occ(11): require_once('/srv/http/owncl...')
#26 {main}

Server configuration
Operating system: Manjaro Linux fully updated
Web server: Apache
Database: ownCloud built in
PHP version: 7.0.x
ownCloud version (see ownCloud admin page): 9.1.4 to 10.0
Updated from an older ownCloud or fresh install: updated
Special configuration (external storage, external authentication, reverse proxy, server-side-encryption): N/A

How can I troubleshoot this? Thanks!


#2

Looks like a permission issue where the user running the occ command doesn't have the permissions to read / access the data/owncloud.db


#3

Yes that was the problem! I followed the instructions here and was able to continue the upgrade process. Thank you!