Running Updater after manual upgrade on shared hosting runs in timeout

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face: is for home/non-enterprise users. If you’re running a business, paid support can be accessed via where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.4
PHP version (eg, 7.1): 7.3

I followed the steps for manual upgrade because web updater is running in timeouts while doing the backup.

How to upgrade
Manual Upgrade with Shared Hosting/Webhosting

So I

  • download and extract the nextcloud files for 16.0.9
  • set maintenance to true
  • copied config.php, data and 3rd party apps to directory of new version
  • renamed old version to “nc_old” and new version to “nc”
  • set maintenance to false
  • opened my instance via browser and clicked “upgrade”

I’m running in a timeout here again. Web Updater says I "to prevent timeouts use ./occ upgrade", but I’m not able to do this on sharedHosting (I have SSH access but can not run sudo commands, so I get a "permission denied when running ./occ upgrade).

So: How can I finish the upgrade process after manual file update on a system without sudo permissions?

Thank you for your responses!


$CONFIG = array (
  'instanceid' => 'oc6cbvwhknq6',
  'passwordsalt' => 'IZZ3cW55Q8sAseDOnuKjcX7ux2AV+7',
  'secret' => 'ztM77bf0X8IOfkwmvMA6unDtO21SeHVCYZnUPEOyw64v4OdT',
  'trusted_domains' => 
  array (
    0 => '********',
  'datadirectory' => '/var/www/vhosts/*********/httpdocs/nc/data',
  'overwrite.cli.url' => '*******',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => '******',
  'dbhost' => '**********',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*****',
  'dbpassword' => ******',
  'installed' => true,
  '' => 'production',
  'maintenance' => true,
  'mail_from_address' => '*****',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => '******',
  'theme' => '',
  'loglevel' => 0,
  'mail_smtphost' => '******',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_smtpauth' => 1,
  'mail_smtpname' => '*******',
  'mail_smtppassword' => '*******',
  'mail_smtpport' => '***',
  'skeletondirectory' => '',
  'app_install_overwrite' => 
  array (
    0 => 'mail',
    1 => 'occweb',
  'trashbin_retention_obligation' => 'auto, 180',
  'updater.secret' => '$2y$10$UHvKGZ/rdVycW.uaPZ1areN2ud7qQ9S9EWBR69T4fV4gH7AqTWmsm',

I have made some progress on this.
Good news: The webserver seems so run under my user-account. So I can use occ without sudo.

Bad news:
I run into this error using php occ upgrade

Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root directory. See

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /httpdocs/nc/lib/private/Console/Application.php:166
Stack trace:
#0 /httpdocs/nc/console.php(96): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /httpdocs/nc/occ(11): require_once('/httpdocs/nc/co...')
#2 {main}bash-4.3$

The Permissions seem to be correct:

bash-4.3$ ls -l
total 148
drwxr-xr-x 54 hostingXXXXX psacln  4096 Apr  6 21:50 apps
drwxr-xr-x  2 hostingXXXXX psacln  4096 Apr  6 23:11 config
-rw-r--r--  1 hostingXXXXX psacln  4986 Sep  1  2019 cron.php
drwxrwx--- 24 hostingXXXXX psacln  4096 Feb  6 09:32 data
-rw-r--r--  1 hostingXXXXX psacln   283 Sep  1  2019 occ
drwxr-xr-x  2 hostingXXXXX psacln  4096 Sep  1  2019 updater

So why is this happen?