Linux ETC

1. proftp 설치
- 다운로드 : ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5a.tar.gz
- 명령어

cd /usr/local/src
wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.5a.tar.gz
tar xvfz proftpd-1.3.5a.tar.gz
cd proftpd-1.3.5a
./configure --prefix=/usr/local/proftpd --enable-auto-shadow
make

make install 


2. proftpd.conf 설정
vi /usr/local/proftpd/etc/proftpd.conf

#ServerType standalone <= xinetd 데몬을 이용할 것이기때문에 아래와 같이 사용
ServerType inetd

#MaxInstances 30     <= xinetd 파일에서 설정을 할 것이므로 주석처리

# Set the user and group under which the server will run.
#User nobody     <= User 와 Group 은 주석처리 후 아래와 같이 설정
#Group nogroup    

# Set the user and group under which the server will run.
User nobody
Group nobody


#<Anonymous ~ftp>
  User ftp        <= 익명 접속을 허용하지 않을 것이므로 주석처리
  Group ftp
#<Anonymous ~ftp>
#  User ftp       
#  Group ftp

이후 내용들을 보면 대부분이 Anonymous 관련된 내용이므로 Anonymous 를 허용하지 않으려면 모두 주석처리를 하면 된다. 


3. xinetd 에 proftpd 설정하기
- 먼저 xinetd 데몬이 설치 되어 있는지 확인한다.
- xinetd 데몬이 설치 되어 있지 않으면 yum 으로 xinetd 데몬을 설치 하도록 한다.
vi /etc/xinetd.d/proftpd

service ftp
{
        flags                   = REUSE
        socket_type             = stream
        instances               = 10
        wait                    = no
        user                    = root
        server                  = /usr/local/proftpd/sbin/in.proftpd
        log_on_success          = HOST PID
        log_on_failure          = HOST
        disable                 = no
}

4. xinetd 실행으로 proftpd 데몬 확인


/etc/init.d/xinetd restart 

netstat -lnp


proftpd.png


5. 접속되는지 정상적으로 확인하기
- 윈도우상에서 telnet 또는 ftp 프로그램 이용
telnet xxx.xxx.xxx.xxx 21
proftpd_telnet.png

- ftp 프로그램 이용시 리눅스에서 사용하는 home 계정으로 접속하면 됩니다.
proft_ftp.png