Hello, I'm manually upgrading a copy of nextcloud. The original was located at /var/www/clients/client1/web3/web The new version is now expanded at /var/www/clients/client1/web3/web/nextcloud Next step is to move the new nextcloud folder to web3/web and change the name of the existing web directory to web3/web.backup When I try to sudo mv or cp /var/www/clients/client1/web3/web/nextcloud to /var/www/clients/client1/web3 I get 'Operation not permitted' Chowning ownership to root:root has same outcome and also a variety of other approaches including wget of nextcloud into web3 and mv /web to /web.backup My apologies if I'm missing something really obvious. I welcome advice.
The folder /var/www/clients/client1/web3 is protected as you should not create folders in there. You can remove the protection like this: chattr -i /var/www/clients/client1/web3 and then add it again when you are finished: chattr +i /var/www/clients/client1/web3 The command must be run as root user. And do not change the ownership of any of these folders, you'll likely open up security holes when you do so or your application will stop working. But generally, you should not create folders there, so better avoid that. E.g. a better way to do what you like to achieve is e.g.: mkdir /var/www/clients/client1/web3/private/backup/ mv /var/www/clients/client1/web3/web/* /var/www/clients/client1/web3/private/backup/ mv /var/www/clients/client1/web3/private/backup/nextcloud/* /var/www/clients/client1/web3/web/
Dear Till, Wow. Thank you for such a fast reply! It worked and is useful to understand how best to backup. I'm slowly getting the hang of best practice in using ISPConfig. Its a great software!
A follow up question. I just remembered I had chowned /web and contents to root:root , and then chowned everything back to web3:client1. Are there any folders in /web that should be root:root ? Also in /web3 most folders are currently root:root except /web, /webdav, /tmp, /.ssh /private /cgi-bin and /backup are web3:client1 is that correct?