Menu

Unable to update externsions

2021-07-05
2021-07-06
  • Mark McElhenny

    Mark McElhenny - 2021-07-05

    As part of our push to upgrade from 2.4 to 2.7 I'm in the process of making sure all our extensions are up to date. However when I try and update the itop-Communication module from 1.0.9 to 1.1.0 using itop Hub I get an error:

    Warning: unlink(/var/www/html/itop2.4.1/data/cache-production/apc-emul/-itop-2acdb1927c5c4c0360a9c4b65eef3c60-production-dbsearch-cache-006407a74785d88e150711978a12279e): Permission denied in /var/www/html/itop2.4.1/setup/setuputils.class.inc.php on line 630

    There are hundreds of these errors listed all for files within the apc-emul folder, I've checked and all the files have rw-r--r-- permissions

    Any ideas what the issue is?

     

    Last edit: Mark McElhenny 2021-07-05
  • Guillaume Lajarige

    Hello Mark,

    Most of he time this is because you are running the CRON job with a different user (root?) than the web server user (www-data? apache?). Therefore it changes the permissions on the folder and the webserver cannot perform the operation.

    Make sure that the iTop folders have the right permissions for the web server and try again, it should be ok.

    Hope this helps,
    Guillaume

     
  • Mark McElhenny

    Mark McElhenny - 2021-07-05

    Ok so logged into the Webmin dashboard and can see the scheduled CRON jobs do indeed run as Root however teh strange thing is I can upgrade extensions on the Dev instance which sits on the same server. Is there a file that shows what the web server user is so I can compare between production and dev ?

     
  • Guillaume Lajarige

    If you don't have the CRON job running for the dev server, it is normal that everything is fine. Are you running it on the dev instance as well?

    Regarding the web server user, unfortunately there is no file that display such information in the community package. 😕 But you should be able to find how to do it online.

    Cheers,
    Guillaume

     
  • Mark McElhenny

    Mark McElhenny - 2021-07-06

    OK so yesterday I noticed that on the production instance the apc-emul folder was owned by root however the the same folder on the dev instance was owned by www-data which I'm guessing is why it worked. However today I tried to install another extension on Dev and it now fails with the same error. On inspection of the Dev apc-emul ownership has now changed to root. (See attachment). Any idea what caused it to change to root ownership?

     
  • Guillaume Lajarige

    "www-data" is a common user for the webserver. You should set all permissions with this user, and run the CRON job with that user too.

    Cheers,
    Guillaume

     
  • Guillaume Lajarige

    "Any idea what caused it to change to root ownership?" It's the CRON job that does that when planned with root instead of www-data.

     

Log in to post a comment.