Page 1 of 1
Managing Website On RPi
Posted: Fri Nov 20, 2015 4:00 pm
by davef21370
I've installed Apache, PHP, etc. on the Pi and left it running headless as I want to build a little website.
However, using WinSCP to move files from my laptop to the Pi I get the error....
Permission denied.
Error code: 3
Error message from server: Permission denied
...as I'm not logged in as root and the location is var/www/html/
What's the best way to handle this?
Dave.
Re: Managing Website On RPi
Posted: Fri Nov 20, 2015 9:17 pm
by rpdom
Make sure the pi user is in the www-data group
Re: Managing Website On RPi
Posted: Sat Nov 21, 2015 10:41 am
by davef21370
Thanks for the reply, unfortunately I'm getting the same result.
I used "sudo usermod -g www-data pi" and checked with "groups pi" which showed "pi : www-data" among other things but I still get the permission denied error.
Any more help greatly appreciated.
Dave.
Re: Managing Website On RPi
Posted: Sat Nov 21, 2015 4:15 pm
by DougieLawson
sudo -i
cd /var/www
chown -R www-data.www-data *
Re: Managing Website On RPi
Posted: Sat Nov 21, 2015 5:50 pm
by davef21370
Thanks Dougie but still no permission from WinSCP, gonna leave it, not worth the hassle.
Regards.
Dave.
Re: Managing Website On RPi
Posted: Sun Nov 22, 2015 12:19 pm
by davef21370
Got it sorted...
sudo usermod -G www-data pi
pi@raspberrypi ~ $ sudo chown -R pi.www-data /var/www/html
pi@raspberrypi ~ $ sudo chmod -R g+w /var/www/html
...thanks all.
Dave.