raspberry pi ftp server (vsftpd)

assuming raspbian
– apt-get install vsftpd
By default vsftpd is configured for anonymous access with read-only permissions. We’re going to change things so that it requires you to authenticate with a local user. Let’s open the configuration file.

sudo nano /etc/vsftpd.conf

We want to change or uncomment the following values.

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
chroot_local_user=YES
user_sub_token=$USER
local_root=/home/$USER/ftp

After that restart the vsftpd service. Now we need to create a couple folders in your local user’s home folder. The ftp folder will be the root when you connect. The way vsftpd works, the root is not allowed to have write permissions on it, so we’ll create a sub-folder inside the root called files which our local user will be allowed to write to. This is where you’d upload/download files from with an FTP client.

mkdir /home/andreas/ftp
mkdir /home/andreas/ftp/files
chmod a-w /home/andreas/ftp

Now you should be able to connect to your from any FTP client and start uploading/downloading files.