RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR
vsftp 설치및 설정을 정리한 것입니다.
vsftpd.conf의 내용중 잘못된 것은 리플을 달아 주시기 바랍니다.(다른 것들도..)

vsftp란?

vsftp는 very secure ftp로 레드햇에서 사용을 권유하고 있다.
기능과 성능,보안면에서 기존의 어떤 ftp보다 막강해 사용자들이 늘어나고 있는 추세이다.
가상 아이피와 가상 유저 설정이 가능하고, 전송 대역폭 지정, 상세로그,pam 지원등의 기능이 있다.

vsftp 다운받기

ftp://vsftpd.beasts.org/users/cevans/ 에서 다운 받을수 있다.(브라우저로는 접근이 안됨)
또는 초심 자료실에서 받을수 있다.
여기서는 1.2.0을 사용할 것이다.

vsftp 설치하기

[root@sa vsftpd]# tar xvfz vsftpd-1.2.0.tar.gz
[root@sa vsftpd]# cd vsftpd-1.2.0

로그파일에 한글명이 깨져 나오지 않게 하려면 logging.c 파일에서

/* str_replace_unprintable(p_str, '?'); */

주석처리해 주면 된다.
또한 tcp_wrappers를 통한 접속제어를 사용하려면 builddefs.h 에서 #undef VSF_BUILD_TCPWRAPPERS 를 #define VSF_BUILD_TCPWRAPPERS 로 바꾸면 된다.

[root@sa vsftpd-1.2.0]# make
[root@sa vsftpd-1.2.0]# make install
[root@sa vsftpd-1.2.0]# cp vsftpd.conf /etc/
[root@sa vsftpd-1.2.0]# cp RedHat/vsftpd.pam /etc/pam.d/vsftpd
[root@sa vsftpd-1.2.0]# cat /etc/pam.d/vsftpd
#%PAM-1.0
auth required /lib/security/pam_listfile.so item=user sense=deny file=/etc/ftpusers onerr=succeed <==(1)
auth required /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_shells.so
account required /lib/security/pam_pwdb.so
session required /lib/security/pam_pwdb.so

이 파일은 /etc/ftpusers에 등록된 유저명은 접근을 하지 못하게 하는 것이다.(sense=deny)
ftpusers 파일이 없다면 생성해 주면 된다..(/etc/passwd 파일을 참조해 작성하면 된다.)

vsftp 설정하기

[root@sa vsftpd-1.2.0]# vi /etc/vsftpd.conf

anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
xferlog_enable=YES
xferlog_file=/var/log/vsftpd.log
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd.chroot_list
chroot_local_user=YES

vsftpd.chroot_list 주석제거시 해당 파일이 없으면 500 OOPS: cannot open chroot() user list file 에러 발생시키니 주의하자.
vsftpd.conf에 대한 설명은 아래 내용을 참조하도록..

[root@sa vsftpd-1.2.0]# killall -1 xinetd
재실행후 접속을 하면 된다..

실행시 에러들 ----------------------------------------------
500 OOPS: cannot change directory:/var/ftp
/var/ftp 디렉토리를 생성해 주면 된다.
550 Permission denied.
write 권한이 없는 경우 발생하는 에러이다.(write_enable=YES로 지정)
--------------------------------------------------------------

#####################################
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
# 익명 접속 허가 여부
anonymous_enable=YES
#
# 로컬 사용자 로그인 허가 여부(디폴트 NO)
#local_enable=YES
#
# FTP write 명령어 사용여부(주석처리되어 있으면 자료 업로드가 불가능해 진다. 디폴트 NO)
#write_enable=YES
#
# umask 지정. 디폴트는 077이다. (umask는 퍼미션에서 해당 권한을 뺀 수이다.
# 즉 022이면 디렉토리 생성시 기본 퍼미션은 755가 되는것이다.)
#local_umask=022
#
# 익명 사용자 업로드 허용여부. 허용시 업로드하실 있는 디렉토리를 생성해 주어야 한다.
#anon_upload_enable=YES
#
# 익명 사용자 새 디렉토리 생성 허가 여부
#anon_mkdir_write_enable=YES
#
# 어떤 디렉토리에 접근시 메세지를 사용자에게 보여주는지 여부
dirmessage_enable=YES
#
# 업로드/다운로드 로그 기록 여부
xferlog_enable=YES
#
# port 20 (ftp-data) 사용 여부
connect_from_port_20=YES
#
# 익명 사용자가 등록한 파일의 소유권을 변경할지 여부
# chown_username으로 지정된 이름으로 변경됨(root로는 지정하지 말것)
#chown_uploads=YES
#chown_username=whoever
#
# 로그 기록 파일의 경로
#xferlog_file=/var/log/vsftpd.log
#
# 일반적으로 사용되는 ftp의 로그 형식을 원한다면 주석 제거
#xferlog_std_format=YES
#
# 클라이언트에서 아무런 명령이 없을경우 세션을 끝낼때까지의 대기시간(디폴트 300초)
#idle_session_timeout=600
#
# data connection을 끝을 대기 시간(디폴트 60초)
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# 비동기식 ABOR 사용 여부(보안상 비추천)
#async_abor_enable=YES
#
# 아스키 모드 업로드/다운로드 사용여부
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# ftp접속시 환영 메세지
#ftpd_banner=Welcome to blah FTP service.
#
# 익명 접속시 패스워드에 일반 이메일 주소를 거부하는지 여부..(vsftpd.banned_emails에 지정된 이메일 주소만 허용)
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# 접속시 최상위 디렉토리가 홈 디렉토리가 되도록 지정하는지 여부..
#chroot_list_enable=YES
# (default follows)
#
# /etc/vsftpd.chroot_list가 지정된 사용자는 홈 디렉토리가 최상위 디렉토리가 된다.
# 해당 파일이 없으면 500 OOPS: cannot open chroot() user list file 에러 발생시킴
#chroot_list_file=/etc/vsftpd.chroot_list
#
# 이것은 지정하게 되면 vsftpd.chroot_list의 사용자에게는 전체 디렉토리를 출력하고, 그외는 홈 디렉토리가 최상위 디렉토리가 된다.
#chroot_local_user=YES
#
# 디렉토리 내용 출력시 캐쉬 사용여부..(클라언트 ftp접속 프로그램에서도 지정 가능)
#ls_recurse_enable=YES
이올린에 북마크하기
2007/08/29 12:57 2007/08/29 12:57
http://jiny.kr/trackback/237
전체 (406)
지니소식 (4)
자료실 (4)
정보|뉴스 (5)
SmartPhone (1)
Languages (206)
Server (153)
Database (27)
Design (4)
Gallery (0)
분류하기귀찬.. (2)
«   2012/02   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29      
  1. 창의력과 상상력을 넘어서  2009
    Tomcat 6.0 기본 환경 설정
  2. 닥공  2009
    서블릿 tomcat 6.0 실행시 에러
  1. 2010/07 (1)
  2. 2010/05 (1)
  3. 2010/02 (3)
  4. 2010/01 (3)
  5. 2009/05 (2)
Statistics Graph