You are on page 1of 1

# Topic – 7: FTP Server in Linux

$ yum install vsftpd ftp -y ; Install vsftpd


$ vi /etc/vsftpd/vsftpd.conf; Configure vsftpd
$ anonymous_enable=NO; Disable anonymous login
$ ascii_upload_enable=YES; ## Uncomment ##
$ ascii_download_enable=YES; ## Uncomment ##
$ ftpd_banner=Welcome to UNIXMEN FTP service! ; Set Benner Message
$ use_localtime=YES; Add at the end of this file

# Enable and start the vsftpd service:


systemctl enable vsftpd
systemctl start vsftpd
systemctl restart vsftpd

# Firewall And SELinux Configuration (Allow the ftp service and port 21 via firewall):
firewall-cmd --permanent --add-port=21/tcp
firewall-cmd --permanent --add-service=ftp
firewall-cmd –reload; Restart firewall

# Update the SELinux boolean values for FTP service:


setsebool -P ftp_home_dir on

# Create FTP users (By default, root user is not allowed to login to ftp server)
$ useradd student
$ passwd student
$ cat /etc/passwd | grep time;
$ cd /home/time
$ touch file; Create a file.
$ pwd;
$ cat /etc/vsftpd/user_list;
$ vi /etc/vsftpd/user_list;
$ chmod 550 /home/time;

You might also like