Ben's

ubuntu linux vsftpd 설정방법 본문

리눅스

ubuntu linux vsftpd 설정방법

Ben Ko (SINCE 2013) 2013. 1. 17. 17:45
728x90

root@test-0006:~/src# dpkg -s vsftpd
Package: vsftpd
Status: install ok unpacked      ===========> 설치는 되어 있는데 설정이 안된 상태임.
Priority: extra
Section: net
Installed-Size: 424
Maintainer: Ubuntu Core Developers <ubuntu-devel@lists.ubuntu.com>
Architecture: amd64
Version: 2.0.5-2ubuntu2
Provides: ftp-server
Depends: libc6 (>= 2.5-0ubuntu1), libcap1, libpam0g (>= 0.76), libssl0.9.8 (>= 0.9.8c-1), libwrap0, libpam-modules, adduser, netbase, lsb-base (>= 1.3-9ubuntu3), ssl-cert (>= 1.0-11ubuntu1), sysv-rc (>= 2.86.ds1-14.1ubuntu2), update-inetd
Recommends: logrotate
Conflicts: ftp-server
Conffiles:
/etc/init.d/vsftpd newconffile
/etc/pam.d/vsftpd newconffile
/etc/logrotate.d/vsftpd newconffile
/etc/vsftpd.conf newconffile
/etc/ftpusers newconffile
Description: The Very Secure FTP Daemon
A lightweight, efficient FTP server written from the ground up with
security in mind.
.
vsftpd supports both anonymous and non-anonymous FTP, PAM authentication,
bandwidth limiting, and the Linux sendfile() facility.
Original-Maintainer: Matej Vela <vela@debian.org>

 

* 설치는 되어 있으나 설정파일이 기본 파일명으로 되어 있어 설정파일명 바꿔주고 기본 설정 해줌.

cp /etc/init.d/vsftpd.dpkg-new /etc/init.d/vsftpd
chmod +x /etc/init.d/vsftpd
cp /etc/vsftpd.conf.dpkg-new /etc/vsftpd.conf
cp /etc/ftpusers.dpkg-new /etc/ftpusers

vi /etc/ftpusers ===> root 유저를 #표시 해줌(# 표시를 해제하면 root로 ftp 사용불가)
vi /etc/vsftpd.conf ===> local_enable=YES, local_umask=022 라인 # 해제


* 설정파일 수정해주었으나 아래의 에러 발생하여 ftp group, user 생성하여 처리

root@test-0006:~# telnet localhost 21
...
500 OOPS: vsftpd: cannot locate user specified in 'ftp_username':ftp

* 처리 완료후 결과
root@test-0006:~# telnet localhost 21
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 (vsFTPd 2.0.5)
quit
221 Goodbye.
Connection closed by foreign host.

 

[참고사이트]
http://blog.naver.com/bassdot?Redirect=Log&logNo=120020477276
http://ftp.kaist.ac.kr/pub/ubuntu/pool/main/
http://blog.naver.com/sgktj?Redirect=Log&logNo=80036421913