u bent hier  » Wadanog » Raspberry pi » ftp server installeren

Origineel artikel staat hier

For this I chose to use vsftp, as it's pretty simple to set up.
Again, either start an SSH session, or continue if you're already in one.

sudo chown -R pi /var/www
sudo apt-get install vsftpd
sudo nano /etc/vsftpd.conf

Search through the file and change the following lines:

anonymous_enable=YES Change To anonymous_enable=NO
#local_enable=YES Change To local_enable=YES
#write_enable=YES Change To write_enable=YES

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.
Now restart the FTP server with "

sudo servce vsftpd restart

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

sudo -i
passwd root

Type in any password (this is only temporary)

Start a new SSH session

Username: root
Password (the one you just set)

nano /etc/passwd

find the line "pi:x;1000:1000:Raspberry Pi User,,,:home/pi:/bin/bash" and change it to
"#pi:x;1000:1000:Raspberry Pi User,,,:home/pi:/bin/bash".
Then hold the Ctrl key and press "x", then release Ctrl and press "y" then hit Return / Enter.

usermod -d /var/www pi

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

sudo -i
usermod -L root

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