FTP Server Installation and Configuration

Locked
User avatar
Mihai Romania
Posts: 60
Joined: 2023 May 03, 14:12
Location: ROMANIA
Contact:

FTP Server Installation and Configuration

Post by Mihai »

install the vsftpd package

Code: Select all

[root @ centos ~]$ yum install -y vsftpd
Add vsfpd service to startup

Code: Select all

[root @ centos ~]$ chkconfig vsftpd on
Edit the config of the vsftpd program, with the desired configuration

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
Start vsftpd service

Code: Select all

[root @ centos ~]$ service vsftpd restart
Add the users you want to access the ftp server to the operating system and set a password for each user

Code: Select all

[root @ centos ~]$ useradd user1
[root @ centos ~]$ passwd user1
Install ftp client

Code: Select all

[root @ centos ~]$ yum install -y ftp
Set FTP home directory

Code: Select all

[root @ centos ~]$ setsebool -P ftp_home_dir on
Connecting to the FTP server can also be done through the utilities: Filezilla, WinSCP, PUTTY, Browser.
I'm on LinkedIn
Locked