Nextcloud upgrade operaiton not permitted

Discussion in 'ISPConfig 3 Priority Support' started by tlove, Aug 28, 2021.

  1. tlove

    tlove Member HowtoForge Supporter

    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.
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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/
  3. tlove

    tlove Member HowtoForge Supporter

    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!
  4. tlove

    tlove Member HowtoForge Supporter

    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?
  5. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I believe the /web/stats folder should be owned by root. The others sound correct.
  6. tlove

    tlove Member HowtoForge Supporter

    Thanks Jesse. I don't have a /web/stats folder on this website so that should be ok.

Share This Page