Shared Hosting (WHM/cPanel) upgrade from 25.0.4 to 25.0.10

Support intro

Nextcloud version : 25.0.4
Operating system and version : CentOS v7.9.2009 - with WHM/cPanel
Apache or nginx version : 2.4
PHP version: 8.0

Hey all,

I tried to do a minor upgrade via the web updater.

Everything seems to go fine and then in the “advanced” log it just says an error occurred.
I did notice at first that NextCloud did not want to upgrade due to me having “php.ini” in the public_html folder and I needed to remove it even thou I need it for NextCloud settings to work. After removal everything seemed to go fine until it didn’t.

Checked the logs nothing there, checked the nginx and apache logs nothing. Then I just checked the error logs for my cPanel and found this;

[Sun Feb 26 14:46:34.475199 2023] [core:crit] [pid 26268:tid 47383517910784] (13)Permission denied: [client IP HIDDEN:0] AH00529: /home/USERNAMEHIDDEN/public_html/data/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that ‘/home/USERNAMEHIDDENN/public_html/data/’ is executable

I’m guessing it has something to do with the NextCloud being hosted on a shared hosting and somehow permissions seem to be wonky. The “non-safe” method would be I guess to up the permissions of /data/ to 775 but I kinda don’t want to do that. Does anyone else have the same experience or has a fix?

I tried to upgrade via ssh with php occ upgrade but it stops at the exact same “updated database” as if when I run the update via the web;

php occ upgrade
The current PHP memory limit is below the recommended value of 512MB.
Nextcloud 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
Setting log level to debug
Turned on maintenance mode
Updating database schema
Updated database

And aftet his it just stops. Please note that mym php.ini setting are set to have a memory limit of 9999MB;
; cPanel-generated php ini directives, do not edit
; Manual editing of this file may result in unexpected behavior.
; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation)

allow_url_fopen = Off
display_errors = On
enable_dl = Off
file_uploads = On
max_execution_time = 99999
max_input_time = 99999
max_input_vars = 99999
memory_limit = 9999M
post_max_size = 99999M
session.gc_maxlifetime = 14400
session.save_path = “/var/cpanel/php/sessions/ea-php80”
upload_max_filesize = 99999M
zlib.output_compression = Off

Currently if I set the maintenece to false it goes back to the upgrade interface but fails at the exactly same place.

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

Steps to replicate it:

  1. Update via web interface

The output of your Nextcloud log in Admin > Logging:

Unable to access the web interface

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

text/x-generic config.php ( PHP script, ASCII text )
$CONFIG = array (
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED',
  'secret' => 'REMOVED',
  'trusted_domains' => 
  array (
    0 => 'REMOVED',
  'datadirectory' => '/home/REMOVED/public_html/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'https://REMOVED',
  'dbname' => 'REMOVED',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'REMOVED',
  'dbpassword' => 'REMOVED',
  'installed' => true,
  'mail_from_address' => 'info',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'REMOVED',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'REMOVED',
  'mail_smtpport' => '25',
  'updater.secret' => 'REMOVED',
  'maintenance' => true,
  'theme' => '',
  'loglevel' => 0,

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

No errors to speak of int he apache log

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.