Updating an Addon fails

Permalink
When I attempt to update any of my Addons or the theme, I get this message:

Unable to backup old package directory to /var/www/vhosts/mydomain.com/httpdocs/files/trash

The /files directory and all of it's subdirectories are CHMOD'd to 777, so that's not the problem.

Any ideas? Thanks in advance!

 
andrew replied on at Permalink Reply
andrew
Hmm. Does the add-on you're attempting to upgrade actually have a folder in the packages/ directory currently?
prober996 replied on at Permalink Reply
Andrew, yes it does. Also, I should have mentioned that I am using 5.2.1.1
andrew replied on at Permalink Reply
andrew
Can you verify that files/ contains a directory named trash/ and that it's chmodded to 777 ?
prober996 replied on at Permalink Reply
Yes
andrew replied on at Permalink Reply
andrew
Is the package's directory writable by the web server? If so, then I'm not sure what's going on. In concrete/models/package.php the code that is responsible for moving the file does so with rename(). It has a @ in front of it. If you remove that @ and try you might at least see an error message about what is going wrong.
prober996 replied on at Permalink Reply
Andrew, the files/trash and packages directories are both chmodded to 777 and both are writable by the web server.

I tried the code change to packages.php, and got the same error message as before: "Unable to backup old package directory to /var/www/vhosts/mydomain.com/httpdocs/files/trash"

I am running php as an apache module, not as FastCGI. Could that have something to do with the problem?

Thanks for your help.
prober996 replied on at Permalink Reply
Andrew,

Some new info that hopefully will give you some ideas:

I installed a few new AddOns and then tried to update those that had updates available....Success! The old versions are found in the Trach folder, etc.

But when I try to update the Addons that had been installed last June...Failure!

Is there something I can twiddle in the database that can shed some light?
prober996 replied on at Permalink Reply
Oh, very interesting. The AddOns that I successfully updated still show up as "updates available" on the Add Functionality page.

So, the update process appears to work, and the timestamp for the package in the Packages directory is correct, and the database shows that pkgVersion and pkgAvailableVersion are the same... but C5 still thinks that the update needs to be installed.
afixia replied on at Permalink Reply
afixia
I have the same issue, but I think it's related to IIS 7 and up as I'm having this problem will all versions of Concrete5. I was able to produce an error by removing the @ suppression in the backup code. This is what I got:

Warning: rename(C:\inetpub\wwwroot\scout2/packages/tony_popup,C:\inetpub\wwwroot\scout2/files/trash/tony_popup_20120725095036): Access is denied. (code: 5) in C:\inetpub\wwwroot\scout2\concrete\models\package.php on line 537