FTP Server on Raspberry Pi
We use ProFTP for this
Connect to your SSH client on your Raspberry pi and run the following commands
 Installation:
sudo apt-get install proftpd
Shortly afterwards you will be asked for the start option. Here we choose standalone
Basically, we would already be done here, but now each user would only have access to their own home directory (e.g. /home/pi ). Therefore we create a new user. To do this, we first change the directory.
cd /etc/proftpd/
In the next command please change the name (tutorials) and the path ( /var/www ) where you should see when you go to the server with ftp
sudo ftpasswd --passwd --name tutorials --gid 33 --uid 33 --home /var/www/ --shell /bin/false
Now just enter the password and confirm. If you want to change the user's password at a later date, simply switch back to the directory and run the command again.
In order to unlock the virtual user, we edit the configuration file
sudo nano /etc/proftpd/proftpd.conf
und fügen folgenden Code am Ende ein:Â
DefaultRoot ~
AuthOrder mod_auth_file.c mod_auth_unix.c
AuthUserFile /etc/proftpd/ftpd.passwd
AuthPAM off
RequireValidShell off
With CTRL + O and CTRL + X we save and exit the editor.
Last but not least, we restart the server and try it out
sudo /etc/init.d/proftpd restart
You may still not be able to log in because the corresponding rights are missing, we set them as well
sudo chown -R pi:www-data -R /var/www/html
chmod 777 -R /var/www/htmlÂ