Installation

First things first, we need to install the vsftpd package.

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.

For anonymous login

you have to change only the default folder location. I use a usb hard drive with my pi, so I need to target a folder inside it. If the folder is named ftp and the usb hdff named exthdd, add the following line at the end:

Save & restart with .

To go further with login credentials..

we want to change or uncomment the following values.

Also, add a line to the bottom of the file:

Then hold the Ctrl key and press “x”, then “y”, then the Return / Enter key.

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.

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

Troubleshooting

If you came across problems..

At the moment you will need to change the directory every time you login by FTP, to solve this:

Type:

Type in any password (this is only temporary)

Start a new SSH session

find the line

and change it to

Then hold the Ctrl key and press “x”, then release Ctrl and press “y” then hit Return / Enter.

Now close the SSH session, and start a new one with username: pi and your password, and type the following:

Now you are able to connect to your Raspberry Pi with an FTP client, using the following information:
Host: (Hostname you set – I used raspberryPi)
Username: pi
Password: (Password you set previously)
Port: 21

(Visited 12 times, 1 visits today)