Software | Version |
---|---|
Nextcloud version (eg, 18.0.2): | 19.0.1 |
Operating system and version (eg, Ubuntu 20.04): | CentOS 8 |
Apache or nginx version (eg, Apache 2.4.25): | Apache 2.4.37 |
PHP version (eg, 7.1): | 7.4.9 |
The issue you are facing:
I get an error when I’m trying to update Nextcloud from 19.0.1 to 19.0.2. The updater says:
Check for write permissions
The following places can not be written to:
/var/www/html/nextcloud/updater/../console.php
/var/www/html/nextcloud/updater/../version.php
/var/www/html/nextcloud/updater/../COPYING
/var/www/html/nextcloud/updater/../AUTHORS
/var/www/html/nextcloud/updater/../index.php
/var/www/html/nextcloud/updater/../status.php
/var/www/html/nextcloud/updater/../robots.txt
/var/www/html/nextcloud/updater/../occ
/var/www/html/nextcloud/updater/../remote.php
/var/www/html/nextcloud/updater/../cron.php
/var/www/html/nextcloud/updater/../index.html
/var/www/html/nextcloud/updater/../public.php
This is especially strange because apache
, my web server user, has full rwx
to all directories, and rw-
to all files, recursively, in the/var/www/
directory. Nextcloud lives in /var/www/html/nextcloud/
. It would be nice if we could get some official permissions guidance in the Nextcloud documentation - and a nice script would be helpful. Point me in the right direction and I’ll happily write it, if it makes adoption and troubleshooting easier.
Is this the first time you’ve seen this error? (Y/N): Yes
Steps to replicate it:
- Left-click my user circle in the top right corner
- Left-click “Settings”
- Left-click “Overview” in the Apps Information field
- Wait for Nextcloud’s security checks to complete (the only one it flags me on is that I have not yet set up HSTS)
- Left-click the “Open updater” button
- Left-click the “Start update” button
The output of your Nextcloud log in Admin > Logging
:
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:50:10-0600
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:45:10-0600
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:40:10-0600
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:35:10-0600
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:30:11-0600
Error PHP Module 'pdo_mysql' already loaded at Unknown#0 2020-09-14T12:25:10-0600
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'instanceid' => '$instanceid',
'overwrite.cli.url' => 'https://nextcloud.example.com/',
'htaccess.RewriteBase' => '/',
'passwordsalt' => '$passwordsalt',
'secret' => '$secret',
'trusted_domains' =>
array (
0 => 'nextcloud.example.com',
),
'datadirectory' => '/var/www/html/nextcloud/data',
'dbtype' => 'mysql',
'version' => '19.0.1.1',
'dbname' => '$dbname',
'dbhost' => '$dbhost',
'dbport' => '',
'dbtableprefix' => '$dbtableprefix',
'mysql.utf8mb4' => true,
'dbuser' => '$dbuser',
'dbpassword' => '$dbpassword',
'installed' => true,
'memcache.local' => '\\OC\\Memcache\\APCu',
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'mail_from_address' => 'cloud',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => 'mail.com',
'mail_smtphost' => 'smtp.mail.com',
'mail_smtpport' => '587',
'mail_smtpdebug' => true,
'maintenance' => false,
'updater.secret' => '$updater.secret',
);
The output of your Apache/nginx/system log in /var/log/____
:
/var/log/httpd/error_log
:
[Mon Sep 14 12:27:01.334796 2020] [access_compat:error] [pid 1073:tid 140543510165248] [client a.b.c.d:efghi] AH01797: client denied by server configuration: /var/www/html/nextcloud/data/.ocdata
Other Notes:
I specifically get this error:
However, when I look at my /var/www/html/nextcloud/updater
directory, I only see the following:
$ ls -laFh /var/www/html/nextcloud/updater/
total 656K
drwxr-xr-x. 2 apache apache 43 Jul 15 14:24 ./
drwxr-xr-x. 14 apache apache 4.0K Aug 28 16:36 ../
-rw-r--r--. 1 apache apache 62K Jul 15 14:24 index.php
-rw-r--r--. 1 apache apache 586K Jul 15 14:24 updater.phar
This is turning out sufficiently difficult that I’m suspecting SELinux in some way, just because obnoxious problems like this almost always turn out to be SELinux’s fault somehow.