1

I am trying to use the one-click update feature and continually am getting a 500 error when attempting retrieve available updates on staging server. All my permissions work correctly as my craft install works all over except when updating.

the URL that gives this error is:

http://staging.link.com/index.php?p=admin/actions/update/getAvailableUpdates

Stacktrace:

<h1>PHP Error [500]</h1>
<p>chmod(): Operation not permitted (/var/www/staging/craft/app/helpers/IOHelper.php:1023)</p>
<pre>#0 /var/www/staging/craft/app/etc/errors/ErrorHandler.php(184): Craft\ErrorHandler->handleError()
#1 /var/www/staging/craft/app/framework/base/CErrorHandler.php(133): Craft\ErrorHandler->handleError()
#2 /var/www/staging/craft/app/framework/base/CApplication.php(824): Craft\ErrorHandler->handle()
#3 /var/www/staging/craft/app/etc/web/WebApp.php(681): Craft\WebApp->handleError()
#4 unknown(0): Craft\WebApp->handleError()
#5 /var/www/staging/craft/app/helpers/IOHelper.php(1023): chmod()
#6 /var/www/staging/craft/app/etc/cache/FileCache.php(138): changePermissions()
#7 /var/www/staging/craft/app/framework/caching/CCache.php(185): Craft\FileCache->setValue()
#8 /var/www/staging/craft/app/etc/cache/FileCache.php(64): Craft\FileCache->set()
#9 /var/www/staging/craft/app/services/CacheService.php(130): Craft\FileCache->set()
#10 /var/www/staging/craft/app/etc/et/Et.php(247): Craft\CacheService->set()
#11 /var/www/staging/craft/app/services/EtService.php(54): Craft\Et->phoneHome()
#12 /var/www/staging/craft/app/services/UpdatesService.php(277): Craft\EtService->checkForUpdates()
#13 /var/www/staging/craft/app/services/UpdatesService.php(170): Craft\UpdatesService->check()
#14 /var/www/staging/craft/app/controllers/UpdateController.php(57): Craft\UpdatesService->getUpdates()
#15 /var/www/staging/craft/app/framework/web/actions/CInlineAction.php(49): Craft\UpdateController->actionGetAvailableUpdates()
#16 /var/www/staging/craft/app/framework/web/CController.php(308): CInlineAction->runWithParams()
#17 /var/www/staging/craft/app/framework/web/CController.php(286): Craft\UpdateController->runAction()
#18 /var/www/staging/craft/app/framework/web/CController.php(265): Craft\UpdateController->runActionWithFilters()
#19 /var/www/staging/craft/app/framework/web/CWebApplication.php(282): Craft\UpdateController->run()
#20 /var/www/staging/craft/app/etc/web/WebApp.php(811): Craft\WebApp->runController()
#21 /var/www/staging/craft/app/etc/web/WebApp.php(281): Craft\WebApp->_processActionRequest()
#22 /var/www/staging/craft/app/framework/base/CApplication.php(184): Craft\WebApp->processRequest()
#23 /var/www/staging/craft/app/index.php(62): Craft\WebApp->run()
#24 /var/www/staging/html/index.php(19): require_once()
</pre>
  • Can you confirm that Craft is writing files to its storage/runtime folder properly, and that Apache has sufficient owner/group access? I could be wrong, but it seems like a file ownership problem. – Matt Stein Jan 29 '16 at 17:42
  • @MattStein the craft.log file is properly updating as for the owner/group the craft.log file is different than the rest of the files in directory – mcclaskiem Jan 29 '16 at 18:02
0

That PHP error is happening as Craft is trying to adjust permissions in some folder, either in craft/app or craft/storage.

You’ll need to ensure that both of those folders (and all subfolders) are writable by PHP.

| improve this answer | |
  • Ya I ended up changing those folders to www-data:www-data in order to get it work, Ill just need to properly create a new group so that I can own the files/folders and add it to the same group as PHP – mcclaskiem Jan 29 '16 at 20:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.