Cannot updade NC from 17.0.1 to 18.0.2

Hi

while running web updater I got error as below, before this update, the web updater worked fine
nginx version: nginx/1.17.4

the update process do not generate any log entry under admin/logging
also there are no error in nginx log after starting web updater

Destionation is not writable

Initializing

Current version is 17.0.1.
Update to Nextcloud 18.0.2 available. (channel: “stable”)

Create backup

Could not copy “/var/www/nextcloud/config/config.php.bak-29.01.2020” to “/CloudBackupData/updater-ocm4urcft39c/backups/nextcloud-17.0.1.1/config/config.php.bak-29.01.2020”. Source /var/www/nextcloud/config/config.php.bak-29.01.2020 is not readable. Destination /CloudBackupData/updater-ocm4urcft39c/backups/nextcloud-17.0.1.1/config/config.php.bak-29.01.2020 is not writable

Does anyone have solution to this problem?

there seems to be a problem with permissions on that one…

I don’t think so, becouse this is clean install, it’s woring fine for about half a year, no any kung fu was done on the shell, and as said before - till updating to version 17.0.1 the web updater worked fine. The file that updater says is not readable/writable is correct - I’ve veryfied the file content and it contains the backup configuration data.

Hi!
Looking at the error, it seems that it is a permission error, no matter what you’ve done or not. So I do think that is the issue.

Try to set or verify the necessary permissions and file owners to the paths in the error, and try again.

We are just suggesting what you need to do, and it’s up to you if you want to try it or not :slight_smile:

I’m going to argue becouse:

  • again this is clean system
  • updates till 17.0.1 were woring fine thru webupdater
  • no file changes were made on the root, no custom file permissions
  • and most important - I’m not the only person that have this issue in NextCloud (the are multiple issues like this reported on this forum, so it’s global problem)

And for the people that have this issue don’t do that:

root@jupiter:/var/www/nextcloud/config# ls -la
total 76
drwxr-xr-x 2 www-data www-data 4096 Jan 29 06:34 .
drwxr-xr-x 15 www-data www-data 4096 Nov 9 12:24 …
-rw-r----- 1 www-data www-data 2394 Mar 22 05:07 config.php
-rw-r----- 1 www-data www-data 1998 Oct 29 04:47 config.php.bak
-rw-r----- 1 root root 2256 Jan 29 06:27 config.php.bak-29.01.2020
-rw-r–r-- 1 www-data www-data 52964 Nov 9 12:24 config.sample.php
-rw-r–r-- 1 www-data www-data 264 Nov 9 12:24 .htaccess
root@jupiter:/var/www/nextcloud/config# rm config.php.bak-29.01.2020
root@jupiter:/var/www/nextcloud/config# ls -la
total 72
drwxr-xr-x 2 www-data www-data 4096 Mar 22 05:10 .
drwxr-xr-x 15 www-data www-data 4096 Nov 9 12:24 …
-rw-r----- 1 www-data www-data 2394 Mar 22 05:07 config.php
-rw-r----- 1 www-data www-data 1998 Oct 29 04:47 config.php.bak
-rw-r–r-- 1 www-data www-data 52964 Nov 9 12:24 config.sample.php
-rw-r–r-- 1 www-data www-data 264 Nov 9 12:24 .htaccess
root@jupiter:/var/www/nextcloud/config# ls -la

Becouse it ended that:

Server NextCloud cannot handle the request:
HTTP ERROR 500

aslo as stated before, previous updates worked well and during update there were no issues with access to mentioned backup folder:

root@jupiter:/CloudBackupData/updater-ocm4urcft39c/backups# ls -la
total 16
drwxr-x— 4 www-data www-data 4096 Mar 22 08:19 .
drwxr-xr-x 4 www-data www-data 4096 Mar 22 08:19 …
drwxr-x— 14 www-data www-data 4096 Nov 9 12:23 nextcloud-17.0.0.9
drwxr-x— 12 www-data www-data 4096 Mar 22 08:19 nextcloud-17.0.1.1

the www-data is the owner of the backup folder:

root@jupiter:/CloudBackupData/updater-ocm4urcft39c# ls -la
total 20
drwxr-xr-x 4 www-data www-data 4096 Mar 22 08:19 .
drwxrwx— 53 www-data www-data 4096 Feb 24 09:09 …
drwxr-x— 4 www-data www-data 4096 Mar 22 08:19 backups
drwxr-x— 2 www-data www-data 4096 Nov 9 12:43 downloads
-rw-r–r-- 1 www-data www-data 25 Nov 9 12:43 .step-previous-update

well i would rather change owner chown of a file than deleting it.

and I would like to know why suddenly the backup config file is not own by www-data?

Well you cannot execute php occ upgrade as root, so this should not happen.

Mind to check if your php and nginx (worker) processes are running as www-data and not root?
ps -ef | grep php
ps -ef | grep nginx

I’m not sure if I understund You correctly - I’m running update directry from NC web panel / updater

root@jupiter:/home/jupiter# ps -ef | grep php
root 475 1 0 Mar22 ? 00:00:11 php-fpm: master process (/etc/php/7.3/fpm/php-fpm.conf)
www-data 8531 475 0 Mar23 ? 00:03:57 php-fpm: pool www
www-data 8604 475 0 Mar23 ? 00:03:26 php-fpm: pool www
www-data 10086 475 3 02:29 ? 00:00:53 php-fpm: pool www
root 10189 10187 0 02:55 pts/0 00:00:00 grep php
root@jupiter:/home/jupiter# ps -ef | grep nginx
root 516 1 0 Mar22 ? 00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
www-data 520 516 0 Mar22 ? 00:00:00 nginx: worker process
www-data 521 516 0 Mar22 ? 00:03:46 nginx: worker process
root 10191 10187 0 02:56 pts/0 00:00:00 grep nginx
root@jupiter:/home/jupiter#