[리눅스 FTP서버 구축] proftpd 설치
저는 ubuntu 20.04에서 구축을 해보았습니다.
1. proftpd 설치
sudo apt install proftpd
2. proftpd 설정
vi /etc/proftpd/proftpd.conf
설정 예시
<Global>
DisplayLogin welcome.msg
DisplayChdir .message
DenyFilter \*.*/,"%"
ListOptions "-l"
DefaultRoot ~
RequireValidShell on
MultilineRFC2228 on
ShowSymlinks on
TimeoutNoTransfer 600
TimeoutStalled 600
TimeoutIdle 1200
Umask 022 022
AllowOverwrite on
AllowStoreRestart on
TransferLog /var/log/proftpd/xferlog
IdentLookups off
MaxClients none
DeferWelcome on
SetENV TZ :/etc/localtime
</Global>
<VirtualHost ftp.test.com> : 아파치 처럼 virtualhost를 지정해 줄 수 있다
ServerName "My FTP"
Port 21
ServerAlias ftp.test.com
DefaultServer on
DefaultRoot ~
TransferLog /var/log/proftpd/test.log
DisplayLogin welcome.msg
<Limit LOGIN>
DenyAll
AllowUser test, test1
</Limit>
<Limit Write>
DenyAll
AllowUser test
</Limit>
</VirtualHost>
3. ftp 계정 추가
adduser 계정명
4. ftp 계정 ssh 차단
vi /etc/ssh/sshd_config
DenyUsers test : test계정 접속 차단
sudo service ssh restart