본문 바로가기
SW 프로그래밍/센토스(CenTOS)

[CentOS8]FTP(vsftpd) 설치 및 설정

by N2info 2020. 9. 13.

1. vsftp 설치

[root@localhost home]# dnf install vsftpd -y
Last metadata expiration check: 1:22:35 ago on Sun 13 Sep 2020 01:52:46 PM KST.
Dependencies resolved.
================================================================================
 Package                                    Architecture
================================================================================
Installing:
 vsftpd                                     x86_64

Transaction Summary
================================================================================
Install  1 Package

Total download size: 180 k
Installed size: 343 k
Downloading Packages:
vsftpd-3.0.3-31.el8.x86_64.rpm
--------------------------------------------------------------------------------
Total
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :
  Installing       : vsftpd-3.0.3-31.el8.x86_64
  Running scriptlet: vsftpd-3.0.3-31.el8.x86_64
  Verifying        : vsftpd-3.0.3-31.el8.x86_64
Installed products updated.

Installed:
  vsftpd-3.0.3-31.el8.x86_64

Complete!

 

2. vsftp 실행 및 부팅시 자동실행 설정

[root@localhost home]# systemctl start vsftpd
[root@localhost home]# systemctl enable vsftpd
Created symlink /etc/systemd/system/multi-user.target.wants/vsftpd.service → /usr/lib/systemd/system/vsftpd.service.

 

3. vsftp 환경설정

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen=NO
listen_ipv6=YES
pam_service_name=vsftpd
userlist_enable=NO

 

4. vsftp 재시작 및 상태확인

[root@localhost home]# systemctl restart vsftpd
[root@localhost home]# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
   Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2020-09-13 15:21:22 KST; 14s ago
  Process: 42461 ExecStart=/usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf (code=exited, status=0/SUCCESS)
 Main PID: 42462 (vsftpd)
    Tasks: 1 (limit: 11088)
   Memory: 540.0K
   CGroup: /system.slice/vsftpd.service
           └─42462 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

Sep 13 15:21:22 localhost.localdomain systemd[1]: Stopped Vsftpd ftp daemon.
Sep 13 15:21:22 localhost.localdomain systemd[1]: Starting Vsftpd ftp daemon...
Sep 13 15:21:22 localhost.localdomain systemd[1]: Started Vsftpd ftp daemon.

 

5. 방화벽설정 및 SELInux 설정

[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# firewall-cmd --add-port-21/tcp --permanant
usage: see firewall-cmd man page
[root@localhost ~]# firewall-cmd --add-port=21/tcp --permanent
success
[root@localhost ~]# firewall-cmd --add-service=ftp --permanent
success
[root@localhost home]# firewall-cmd --reload
success
[root@localhost ~]# systemctl restart vsftpd
[root@localhost ~]# systemctl enable vsftpd
[root@localhost home]# setsebool -P allow_ftpd_full_access=1
[root@localhost home]# firewall-cmd
usage: see firewall-cmd man page

 

6. ftp 접속확인

 

 

 

 

 

 

참고 : www.howtoforge.com/how-to-install-vsftpd-server-on-centos-8/