1
votes

I create my site with OctoberCMS in localhost, and it's really fine. But then I transfer to the Ubuntu server (Nginex) and want to download plug-in or update in server. I get this error:

"ZipArchive::extractTo(): Permission denied" on line 75 of /home/admin/web/mymovielist.eu/public_html/vendor/october/rain/src/Filesystem/Zip.php

Of course then i install Zip, but on the internet I found that maybe need to add extension to php.ini file. But don't sure where and what text should add...

Then I give permission root 777 this file, and other. Folder ant etc... But nothing working for now. Somebody, help me.

2

2 Answers

3
votes

Seems when you transfer file from localhost to server, you may be logged in to ubuntu as root user or other user (or if you used ftp you may be using other user)

Nginex uses apache as back-end so now when you perform any read write using website all operation is done under apache user(default) www-data

and when you download plugin or update CMS, website try to download new files in to temp director that is fine, now it try to extract that files into plugin so may be its not having write access to to that location and its your site root-dir/plugins.

so you can use this command to give www-data ownership of that folders so it can write there,

// sudo chown -R www-data:www-data /var/www/your-site-location-root
sudo chown -R www-data:www-data /home/admin/web/mymovielist.eu/public_html

if you are using this command as root user you don't need to add sudo

this command need to be fire under root user.

now it can able to write files there.

if we follow your way then Then I give permission root 777 this file

you are correct but you need to give this permission to root directory as we need to write files inside it, as /home/admin/web/mymovielist.eu/public_html/vendor/october/rain/src/Filesystem/Zip.php this file just executes the commands so if you give it permission then its of no use,

you need to fire this command,

sudo chmod -R 777 /home/admin/web/mymovielist.eu/public_html
0
votes

Hi you need to install 7z with sudo apt install p7zip-full and uncompress the archive with 7z x archiveName.7z