Update from 13.0.1.1 to 13.0.2 Error

I have the same Idea and just removed it… Now it is stopps with next folder:

Could not rmdir: /var/www/nextcloud/updater/../3rdparty

In my case root folder of nextcloud belongs to root, as it made per script:

# ls -la
total 116
drwxr-xr-x 13 root     www-data  4096 May  7 16:37 .
drwxr-xr-x  6 root     root      4096 Apr 27 20:23 ..

I changed it to www-data and now it works…

# sudo chown www-data:www-data ../nextcloud
#ls -la ../
total 24
...
drwxr-xr-x 13 www-data www-data 4096 May  7 16:37 nextcloud

Now is the question: why correct strong permissions will break my web update?

UPDATE:
It is unbelievable… It is finished with same “core/shipped.json is not available” error!
What I did wrong?