# Cannot updade NC from 17.0.1 to 18.0.2

**URL:** <https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745>\
**Category:** ℹ️ Support\
**Tags:** update\_problems\
**Created:** [March 22, 2020, 8:06am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745 "2020-03-22T08:06:38Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![akurzawa](https://help.nextcloud.com/letter_avatar/akurzawa/32/5_5575768a8748004e209b776fc1b2916d.png) [@akurzawa](https://help.nextcloud.com/u/akurzawa)\
**Post date:** [March 22, 2020, 8:06am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/1 "2020-03-22T08:06:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [March 22, 2020, 8:12am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/2 "2020-03-22T08:12:30Z")

</div>

> [@akurzawa](#):
>
> Source /var/www/nextcloud/config/config.php.bak-29.01.2020 is not readable

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

---

<div class="post-metadata">

**Author:** ![akurzawa](https://help.nextcloud.com/letter_avatar/akurzawa/32/5_5575768a8748004e209b776fc1b2916d.png) [@akurzawa](https://help.nextcloud.com/u/akurzawa)\
**Post date:** [March 22, 2020, 8:24am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/3 "2020-03-22T08:24:30Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![denNorske](https://help.nextcloud.com/user_avatar/help.nextcloud.com/dennorske/32/17675_2.png) [@denNorske](https://help.nextcloud.com/u/denNorske)\
**Post date:** [March 22, 2020, 8:41am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/4 "2020-03-22T08:41:11Z")

</div>

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 🙂

---

<div class="post-metadata">

**Author:** ![akurzawa](https://help.nextcloud.com/letter_avatar/akurzawa/32/5_5575768a8748004e209b776fc1b2916d.png) [@akurzawa](https://help.nextcloud.com/u/akurzawa)\
**Post date:** [March 22, 2020, 9:17am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/5 "2020-03-22T09:17:16Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![JimmyKater](https://help.nextcloud.com/user_avatar/help.nextcloud.com/jimmykater/32/4850_2.png) [@JimmyKater](https://help.nextcloud.com/u/JimmyKater)\
**Post date:** [March 22, 2020, 6:09pm UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/6 "2020-03-22T18:09:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![akurzawa](https://help.nextcloud.com/letter_avatar/akurzawa/32/5_5575768a8748004e209b776fc1b2916d.png) [@akurzawa](https://help.nextcloud.com/u/akurzawa)\
**Post date:** [March 22, 2020, 7:00pm UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/7 "2020-03-22T19:00:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![bpcurse](https://help.nextcloud.com/user_avatar/help.nextcloud.com/bpcurse/32/9500_2.png) [@bpcurse](https://help.nextcloud.com/u/bpcurse)\
**Post date:** [March 23, 2020, 8:46pm UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/8 "2020-03-23T20:46:14Z")

</div>

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`

---

<div class="post-metadata">

**Author:** ![akurzawa](https://help.nextcloud.com/letter_avatar/akurzawa/32/5_5575768a8748004e209b776fc1b2916d.png) [@akurzawa](https://help.nextcloud.com/u/akurzawa)\
**Post date:** [March 24, 2020, 6:59am UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/9 "2020-03-24T06:59:24Z")

</div>

> [@bpcurse](#):
>
> Well you cannot execute php occ upgrade as root, so this should not happen.

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#

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:15pm UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/10 "2024-12-11T21:15:55Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:15pm UTC](https://help.nextcloud.com/t/cannot-updade-nc-from-17-0-1-to-18-0-2/74745/11 "2024-12-11T21:15:57Z")

</div>


