본문 바로가기

Single Board Computer

Single Board Computer setting 3. FTP

□ FTP설치

(root 계정에서 설치, root 계정이 아닌 경우 명령문 앞에 sudo를 붙여서 실행해야 함)

apt install vsftpd

□ FTP 설정 파일 편집

nano /etc/vsftpd.conf

------------------------------ vsftpd.conf 설정

listen=YES

listen_ipv6=NO

anonymous_enable=NO

local_enable=YES

write_enable=YES

local_umask=002

dirmessage_enable=YES

use_localtime=YES

xferlog_enable=YES

connect_from_port_20=YES

data_connection_timeout=1200

ascii_upload_enable=YES

ascii_download_enable=YES

utf8_filesystem=YES

chroot_local_user=YES

chroot_list_enable=YES

chroot_list_file=/etc/vsftpd.chroot_list

secure_chroot_dir=/var/run/vsftpd/empty

pam_service_name=vsftpd

rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem

rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key

ssl_enable=NO

allow_writeable_chroot=YES

ftpd_banner=RP FTP Server

아래는 필요에 따라 적용(# 삭제하면 항목 적용 됨)

#anon_upload_enable=YES

#anon_mkdir_write_enable=YES

#chown_uploads=YES

#chown_username=whoever

#xferlog_file=/var/log/vsftpd.log

#xferlog_std_format=YES

#idle_session_timeout=600

#nopriv_user=ftpsecure

#nopriv_user=ftpsecure

#async_abor_enable=YES

#deny_email_enable=YES

#banned_email_file=/etc/vsftpd.banned_emails

#ls_recurse_enable=YES

------------------------------

□ FTP 홈디렉토리 갇히지 않는 사용자 등록

nano /etc/vsftpd.chroot_list

□ 시작/종료/다시 시작하기

service vsftpd start

service vsftpd stop

service vsftpd restart

□ FTP 연결(웹브라우저에서)

ftp://이더넷 IP주소

□ FTP 실행 상태 확인

systemctl status vsftpd

□ 부팅시 자동 시작 등록(아래 실행 없이도 부팅시 자동 시작 되는 것 같음)

systemctl enable vsftpd