October: Unable to update plugins/october in backend

Created on 29 Jul 2014  路  4Comments  路  Source: octobercms/october

Hosting on digital ocean on LAMP. Getting this error when updating projects through backend. Update failed "ZipArchive::extractTo(): Permission denied" on line 71 of /var/www/html/vendor/october/rain/src/Filesystem/Zip.php
I should note that I installed through the cli and attached a project through the backend.

Most helpful comment

Got it to work by running
root@october:/var/www# sudo chown -R root:www-data html
root@october:/var/www# sudo chmod -R 775 html

All 4 comments

It has to do with permissions. Try making sure that your Apache user is the owner, and make sure all directories are 775 and all files are 644 permissions. I find these commands to useful:

find htdocs/ -type d -exec chmod 755 {} \;
find htdocs/ -type f -exec chmod 644 {} \;

Got it to work by running
root@october:/var/www# sudo chown -R root:www-data html
root@october:/var/www# sudo chmod -R 775 html

@jbh you wrote 755 in the command and 775 in the text. Is it safe to chmod everything to 775? I am having issue upgrading to the new version of october

EDIT: I gave the ownership to www-data and didn't need to chmod anything. Changing the owner seems to be a more consistent way of updating. After update you can change the owner back.

@qoalu In the previous user's case, they also needed file permissions in order for it to work. In your case, just making sure the correct owner was applied did the trick.

In the end, this has to do with making sure the correct user has the correct permissions. Whether to use 755, 775, etc is up to the user and how secure they would like to be. 755 should be sufficient.

Was this page helpful?
0 / 5 - 0 ratings