Debian: Set up FTP server - how it works
To load files on your Debian server, you must first set up an FTP server. We'll show you step by step exactly how to do this.
Setting up FTP server under Debian - this is how you proceed
You can set up an FTP server on Debian in just a few steps. There are various providers for this where you can rent an FT server.
- Then proceed as follows: Open the terminal and download the required packages with the "sudo apt-get install proftpd-basic" command.
- You must then enter the following command to create the configuration file:
- $ sudo vi /etc/proftpd/conf.d/custom.conf
- RequireValidShell off
- UseIPv6 off
- DefaultRoot ~ ftpuser
- DenyGroup! Ftpuser
With "sudo service proftpd restart" the changes are saved and the FTP server restarted. In order for the data to be transmitted encrypted by ProFTP, install the SSL protocol with:
- sudo proftpd -vv | grep tls
- mod_tls / 2.4.3
With the following command you create a TLS access:
- $ sudo vi /etc/proftpd/conf.d/tls.conf
- TLSEngine on
- TLSLog /var/log/proftpd/tls.log
- TLSProtocol TLSv1
- TLSRSACertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
- TLSRSACertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
- TLSVerifyClient off
- TLSRequired on
Then restart the server with "sudo service proftpd restart" and create an FTP user for the / var / www / upload folder:
- sudo adduser ftpuser --shell / bin / false --home / var / www / upload
- Here you have to enter a password twice more and the setup is complete.
- Tip: The 20 most important FTP commands can be found on the next page.