[Closed] NC stuck in "Maintenance Mode" during the "App Upgrade" portion of upgrade from to

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com 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, 18.0.2): 18.0.4
Operating system and version (eg, Ubuntu 20.04): Unknown (ISP Version): Kernel 2.6.32-954.3.5.lve1.4.66.el6.x86_64
Apache or nginx version (eg, Apache 2.4.25): 2.4.43
PHP version (eg, 7.1): 7.2.30

The issue you are facing:

Update: Spent another day trying without success to resolve this and came to the reluctant conclusion that it might be easier to wipe the entire environment and start over.

Please consider this issue closed.

Attempting to upgrade to … over come minor problems with unexpected files, got to part where I see status screen showing “Nextcloud will be updated to version 18.0.4… Please make sure the database, the config folder and the data folder have been backed up before proceeding.”

We then get all the way down through the repair steps to “Starting code integrity check” and after a reasonable pause I see “An error occurred. Please reload this page…”

Doing this then pushed me in to the “Maintenance Mode” message…

At that point, a check of ~/status.php returns the following:-


I have tried going to the config.php file and changing the maintenance mode flag from “true” to “false” and restarting, but I return to exactly the same point. I am now unable to progress beyond this point.

Any suggestions would be most gratefully received. Thanks in advance.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Attempt to complete the update from to 18.0.4

The output of your Nextcloud log in Admin > Logging:

Unable to get that; stuck in maintenance mode

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

$CONFIG = array (
  'instanceid' => '<<removed>>',
  'passwordsalt' => '<<removed>>',
  'secret' => '<<removed>>',
  'trusted_domains' => 
  array (
    0 => 'nc.<<removed>>.org',
  'datadirectory' => '/home/<<removed>>/public_html/<<removed>>/nc/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'http://nc.<<removed>>.org',
  'dbname' => 'sauriano_NextCloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '<<removed>>_NextCloud',
  'dbpassword' => '<<removed>>',
  'installed' => true,
  'maintenance' => false,
  'mail_from_address' => 'nc',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '<<removed>>',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => '<<removed>>',
  'theme' => '',
  'loglevel' => 0,
  'updater.secret' => '<<removed>>',

The output of your Apache/nginx/system log in /var/log/____:

Not sure if the following is from "Apache/nginx/system", but this is the only log information I get via a Control Panel from my web host:-

[Thu May 07 20:21:22.333449 2020] [core:crit] [pid 4152004] (13)Permission denied: [client] AH00529: /home/<<removed>>/public_html/<<removed>>/nc/data/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/home/<<removed>>/public_html/<<removed>>/nc/data/' is executable

The closest I can get to checking file permissions is with the assistance of FileZilla. When I use that to check, I see that the ".htaccess" file mentioned above has permissions "644" with an Owner of "926" and a group of "817" [suspect ID's are specific to my web host]. 

The "/nc/data" file, from the "nc" directory, has permissions "0770" and an Owner/Group value of 926:817. All of these permission values look "OK" to me...