Set up Raspberry Pi as an FTP server - how it works
You can also set up your Raspberry Pi as an FTP server. We'll show you how it works.
Set up Raspberry Pi as an FTP server
The following instructions refer to the operating system "Raspbian". If you used a different operating system, some commands may differ. Before you start, you need to have a stable internet connection.
- Establish a connection with your Raspberry Pi via SSH or open the terminal directly on the Pi.
- Install the "ProFTP" program as a standalone. To do this, run the "Sudo apt-get install proftpd" command.
- Configure the file "/etc/proftpd/proftpd.conf". To do this, enter the command "sudo nano /etc/proftpd/proftpd.conf".
- Add the following code: proftpd.conf
- Use the "cd / etc / proftpd /" command to change to the "/ etc / proftpd" folder.
- Create a user for FTP access. Use the command "sudo ftpasswd --passwd --name USERNAME --uid XX --gid XX --home FTP DIRECTORY --shell / bin / false".
- Replace "USERNAME" and "FTP DIRECTORY" with the respective values. For "XX" enter "id www-data". Use the number you get as output for "XX".
- Now set the correct write permissions with the commands "chmod g + s FTP DIRECTORY", "chmod 775 FTP DIRECTORY" and "chown -R www-data: www-data FTP DIRECTORY".
- You can then restart the server with the "sudo /etc/init.d/proftpd restart" command.
Access the FTP server
After successful setup, you can access the FTP server with any FTP program or your browser - provided the device used is on the same network.
- To access via browser, you only need the IP address of the Raspberry Pi.
- To do this, execute the "ifconfig" command in the terminal. And read the IP address.
- Then you can reach the FTP server via "ftp://XXX.XXX.X.XXX". Use the IP address of the Raspberry Pi.
Get more out of Raspberry Pi: with the CHIP Special
You can find even more practical tips in the special issue about the Raspberry Pi in the CHIP kiosk.
- In the CHIP kiosk you will find the Raspberry manual either as a booklet or as a PDF for immediate download and quick start.
- Experience know-how and workshops for all models on 148 pages - including A + / B + / 2. We present many imitation projects - from music streaming to Raspberry Pi as NAS - and show you how to use the Pi as a multimedia center.
If you are looking for alternatives for the Raspberry Pi, here are three competitors.