Cannot write into "config" directory after an upragde

It led to

find: missing argument to `-exec'

find nextcloud/ -type d -exec chmod 750 ‘{}’ \ ;
find nextcloud/ -type f -exec chmod 640 ‘{}’ \;

sorry for typo

No problem.

This is the return of the initial error after typing you commands ! (there is an extran space before the ; for the first one)

:sunny: solved access from web interface ?

No, after typing the two command, the access to the web interface is broken again. Indeed, there is no more group permission to write in config and apps…

check nextcloud and nginx log

I have run

chmod g+w app/
chmod g+w config/config.php
chmod g+w config/

again to have access to the web interface, but I still can’t write files.

There is no error in the nextcloud log file

Antoine, have no more idea, there is a mismatch, I think using different users for nginx and php-fpm add some complexity. Try to unify all www server chain.

Ok I have solved the problem.

Here is my workflow to do the upgrade (this is done by memory so please, if another person is reading this, be careful and check if eveything is right with autocompletion for example…)

service nginx stop
cd /var/www
cp -r nextcloud nextcloud-old
cp nextcloud-old/config/config.php nextcloud/config
cp nextcloud-old/.htaccess nextcloud/
cp nextcloud-old/.users.ini nextcloud/
chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 '{}' \;
find nextcloud/ -type f -exec chmod 640 '{}' \;
chmod g+w nextcloud/config
chmod g+w nextcloud/config/config.php
chmod g+w nextcloud/apps
service nginx start
cd nextcloud
sudo -u www-data php occ upgrade
cd /media/raid/cloud (my data are there)
chown -R nextcloud:www-data user1
chown -R nextcloud:www-data user2

Then it’s ok. I think the last lines are optional, but the permissions in my data folder was broken (maybe a wrong use of the script). So it has to be owned by the user nextcloud and belong to the group www-data.

Thank you tekmed for the help and the patience

Well done!!!