Raspberry Pi - Set up FTP
To set up FTP on the raspberry pi so that we can upload files for the website in wwwFirst, we need to have permission to access the www folder
sudo chown -R pi /var/www
Next, we install FTP
sudo apt-get install vsftpd
Then edit the configuration file for vsftpd
sudo nano /etc/vsftpd.conf
Make the following changes to the configuration file
anonymous_enable=YES -> anonymous_enable=NO#local_enable=YES -> local_enable=YES#write_enable=YES -> write_enable=YES#local_umask=022 -> local_umask=777#chown_uploads=YES -> chown_uploads=YES#chown_username=pi -> chown_username=www-data
Add the following to the end of the file:
force_dot_files=YES
Then restart the service:
sudo service vsftpd restart
Create a shortcut so that the www folder appears in the FTP root:
ln -s /var/www/ ~/www