Installing an FTP server on a Linux system depends on the distribution you are using and the preferred FTP server for Ubuntu/Debian, Fedora/CentOS/RHEL, etc.
Here are the steps to install the popular FTP server vsftpd (Very Secure FTP Daemon) on various distributions:
1. Installing FTP Server on Ubuntu/Debian-based distributions!
2. Installing FTP Server on Fedora/CentOS/RHEL-based distributions!
3. Installing FTP Server on openSUSE-based distributions!
4. Verifying FTP Server Installation on Linux!
1.) Install FTP server on Ubuntu/Debian-based distributions!
1. Update system:
sudo aptupdate
2. Install vsftpd:
sudo apt install vsftpd
3. Start vsftpd service:
sudo systemctl start vsftpd
4. Enable vsftpd service to start automatically when the system boots:
sudo systemctl enable vsftpd
5. Edit vsftpd configuration file:
sudo nano / etc / vsftpd . conf
6. Basic configuration (in the file "/etc/vsftpd.conf" ):
- Allow local users to log in:
local_enable = YES- Enable file uploads:
write_enable = YES
7. Restart vsftpd service to apply the changes:
sudo systemctl restart vsftpd
8. Configure firewall (if active) to allow FTP connections:
sudo ufw allow 20/ tcp sudo ufw allow 21/ tcp sudo ufw reload
2.) Install FTP server on Fedora/CentOS/RHEL-based distributions!
1. Update system:
sudo dnf update # For Fedora sudo yum update # For CentOS / RHEL
2. Install vsftpd:
sudo dnf install vsftpd # For Fedora sudo yum install vsftpd # For CentOS / RHEL
3. Start vsftpd service:
sudo systemctl start vsftpd
4. Enable vsftpd service to start automatically when the system boots:
sudo systemctl enable vsftpd
5. Edit vsftpd configuration file:
sudo nano / etc / vsftpd / vsftpd . conf
6. Basic configuration (in the file "/etc/vsftpd/vsftpd.conf" ):
- Allow local users to log in:
local_enable = YES- Enable file uploads:
write_enable = YES
7. Restart vsftpd service to apply the changes:
sudo systemctl restart vsftpd
8. Configure firewall (if active) to allow FTP connections:
sudo firewall-cmd --zone = public --add-port = 20/ tcp --permanent sudo firewall-cmd --zone = public --add-port = 21/ tcp --permanent sudo firewall-cmd --reload
3.) Install FTP server on openSUSE-based distributions!
1. Update system:
sudo zypper update
2. Install vsftpd:
sudo zypper install vsftpd
3. Start vsftpd service:
sudo systemctl start vsftpd
4. Enable vsftpd service to start automatically when the system boots:
sudo systemctl enable vsftpd
5. Edit vsftpd configuration file:
sudo nano / etc / vsftpd . conf
6. Basic configuration (in the file "/etc/vsftpd.conf" ):
- Allow local users to log in:
local_enable = YES- Enable file uploads:
write_enable = YES
7. Restart vsftpd service to apply the changes:
sudo systemctl restart vsftpd
8. Configure firewall (if active) to allow FTP connections:
sudo firewall-cmd --zone = public --add-port = 20/ tcp --permanent sudo firewall-cmd --zone = public --add-port = 21/ tcp --permanent sudo firewall-cmd --reload
4.) Verifying the FTP server installation on Linux!
To check if the FTP server is working correctly, you can use an FTP client like "ftp" , "lftp" or "FileZilla" to connect to the server.
Example with "ftp" :
ftp localhost
You should be prompted to enter your username and password. If the connection is successful, you have set up your FTP server correctly.
These steps should help you install and configure an FTP server on your Linux system.