Skip to menu

Server Admin

vsftpd 설치

inkwang@gmail.com 2019.02.24 08:17 Views : 89

vsftpd 설치

 

1. yum install vsftpd -y

 

2. vsftpd.conf 설정
# cp vsftpd.conf vsftpd.conf_back
# vi /etc/vsftpd/vsftpd.conf

 

anonymous_enable=NO

local_enable=YES

write_enable=YES

local_umask=022

dirmessage_enable=YES

xferlog_enable=YES

connect_from_port_20=YES

xferlog_file=/var/log/xferlog

xferlog_std_format=YES

 

chroot_local_user=YES

allow_writeable_chroot=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd/chroot_list

 

pam_service_name=vsftpd

userlist_enable=YES

tcp_wrappers=YES

 

3. 항상 작동 요청
# systemctl enable vsftpd.service

 

4. Firewall 설정

# firewall-cmd --permanent --zone=public --add-port=21/tcp

# firewall-cmd --permanent --zone=public --add-port=20/tcp
# firewall-cmd --zone=public --permanent --add-service=ftp

# firewall-cmd --reload

 

5. SELinux 설정

점검
# getsebool -a | grep ftp

 

# setsebool -P ftp_home_dir on

# setsebool -P ftpd_use_passive_mode on
# semanage boolean -m ftpd_full_access --on

 

- P옵션은 영구설정을 의미

- ftp_home_dir 은 ftp서버가 홈디렉토리에만 접근가능하도록 하는 옵션.

- ftpd_use_passive_mode는 ftpd가 Passive모드 사용을 허가하는 옵션.

 

6. Reload
systemctl restart vsftpd

2. install vsftpd -y

Up