FTP Server Installation and Configuration
Posted: 2023 May 03, 19:17
install the vsftpd package
Add vsfpd service to startup
Edit the config of the vsftpd program, with the desired configuration
Start vsftpd service
Add the users you want to access the ftp server to the operating system and set a password for each user
Install ftp client
Set FTP home directory
Connecting to the FTP server can also be done through the utilities: Filezilla, WinSCP, PUTTY, Browser.
Code: Select all
[root @ centos ~]$ yum install -y vsftpd
Code: Select all
[root @ centos ~]$ chkconfig vsftpd on
Code: Select all
[root @ centos ~]$ nano /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
#anon_upload_enable=YES
#anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
#chown_uploads=YES
#chown_username=whoever
#xferlog_file=/var/log/xferlog
xferlog_std_format=YES
#idle_session_timeout=600
#data_connection_timeout=120
#nopriv_user=ftpsecure
#async_abor_enable=YES
ascii_upload_enable=YES
ascii_download_enable=YES
ftpd_banner=Welcome to OSTECHNIX FTP service.
#deny_email_enable=YES
#banned_email_file=/etc/vsftpd/banned_emails
#chroot_local_user=YES
#chroot_list_enable=YES
#chroot_list_file=/etc/vsftpd/chroot_list
ls_recurse_enable=YES
listen=YES
#listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
use_localtime=YES
Code: Select all
[root @ centos ~]$ service vsftpd restart
Code: Select all
[root @ centos ~]$ useradd user1
[root @ centos ~]$ passwd user1
Code: Select all
[root @ centos ~]$ yum install -y ftp
Code: Select all
[root @ centos ~]$ setsebool -P ftp_home_dir on