When I try to install a plugin or theme I get the following error on my Raspberry Pi install:
Oops, the package download failed. Please try again later. (Package not extracted)
Does this mean I have a problem with chmod permissions? Need to install some other extractor?
I've been following the steps at: https://pimylifeup.com/raspberry-pi-web-server/ and php 7.0 at: https://www.stewright.me/2016/03/turn-raspberry-pi-3-php-7-powered-web-server/
Thank you for your time and assistance with an uninitiated new user. :)
here's how to install new plugins/themes:
Go to typesetter.com/themes and /plugins and download items from there.
Extract to a local folder, then use Filezilla or similar service to.upload the extracted folder into the addons folder on your website.
Enter your admin on the site, go to plugins admin, click on Available, you can now see the new addon and click install.
This always works for me.:-)
Ok, it appears that my chown and chmod are totally screwed up - the folders are owned by Apache www-data but I upload as user "pi", so I'm definitely not understanding what I need to do to correct it. At one point I messed up the permissions so badly that my Typesetter page simply said "Forbidden!" ... so I changed things to 777 permission and now the page loads again. But I still can't install plugins or themes through the Typesetter interface (unable to extract) or the Filezilla SFTP route (I was able to copy the h5 theme to the addons folder, but it doesn't show up in my Available options) :(
I simply don't understand permissions well enough to understand how to go about fixing this issue with Raspberry Pi users. I even tried sudo usermod -aG www-data pi and that didn't seem to work either. Should I just clean-install and start over since I have screwed up the permissions in an attempt to correct it?
I first attempted:
[email protected]:~ $ sudo chown -R www-data:www-data /var/www
[email protected]:~ $ sudo chmod -R 664 /var/www/
[email protected]:~ $ sudo usermod -aG www-data pi
That made me have "Permission Denied" once I tried to go to the 'www' folder.
So i typed:
[email protected]:/var $ sudo chmod 777 /var/www/
And that let me use it again.
In FileZilla the Owner/Group shows the 777 designation (drwxrwxrwx) and Owner/Group as (www-data www-data) my h5 copied theme folder has me as (pi pi).
Now I am just confused, sorry guys.
EDIT: copying the h5 theme to the Themes folder instead of the Addons folder allowed it to show up as an installed theme using Filezilla. This seems like a messy work-around though for my permissions problem lol
I recently read Raspberry's MagPi #58 which had a "server setup guide" (Pg. 40) https://www.raspberrypi.org/magpi-issues/MagPi58.pdf
It mentioned for permissions to use:
sudo chown -R pi /var/www/html
This however, didn't fix the unpacking/extract problem that would allow you to install themes and plugins using Typesetters interface :(
Does Typesetter use a different folder path that I need to set permissions for?
copying the h5 theme to the Themes folder instead of the Addons folder allowed it to show up as an installed theme using Filezilla. This seems like a messy work-around though for my permissions problem lol
the /themes folder is the correct one to install themes manually.
For the other issues: it's not neccesarily the permissions. If you can upload files via Admin Toolbox -> Content -> Uploaded Files (AKA 'finder') your file permissions are likely O.K.
Maybe your installation is lacking some libraries to handle ZIP files. You could try to uplaod a ZIP archive via finder and use finder's 'Extract files from archive' feature and see if this works.
Thank you juergen,
Using the Uploaded Files section I can upload fine, and apparently I can also use the "extract files from archive" feature with no problems. So if this means my permissions are fine, then why does the themes and plugins sections give me a "Oops, the package download failed. Please try again later. (Package not extracted)" when I try to click the "install now" link? Could this be a result of running PHP7 then?
Ok, I just did a complete fresh re-install using PHP5 instead of PHP7 and the Themes and Plugins "install now" worked! So I am wondering if I either didn't install PHP7 correctly, or if Typesetter just doesn't work with PHP7 for themes and plugin installs?
sudo apt-get install php5 php5-gd libapache2-mod-php5 -y
On Raspberry Pi it installed PHP version 5.6.30
Wow, this is embarrassing, you are 100% correct, I didn't have php7.0-zip installed :(
I have a few Pi's laying around the office, so I was able to try both the PHP5 and PHP7 and apparently the PHP5 includes all the stuff where the PHP7 you need to make sure you have all the other tid-bits (php7.0-gd and php7.0-zip) included. My bad :(
Thank you juergen for your patience with a very new user, I am glad to know Typesetter doesn't have any PHP issues, it just has end-user issues. Thank you everyone who replied to this thread, I hope it's existence can help other novice Raspberry Pi users in the future. I just put Typestter on a Raspberry Pi Zero W last night and it works! So that is saying something, you can have your own Typesetter "server" for around $10 https://www.raspberrypi.org/products/pi-zero-w/
Again, thank you everyone! :)