1. 서버 오픈하기
apt install vsftpd
service vsftpd status
netstat -natp | grep ftp
ifconfig
2. 클라이언트 계정 생성하기
useradd client
passwd client
## 530 Login incorrect 해결
gedit /etc/passwd
## client:x:1002:1002::/home/client 를
## client:x:1002:1002::/home/client:/bin/bash 로 편집
윈도우 cmd 창 열고,
ftp (우분투 IPv4)
id와 passwd 입력
-> 로그인 성공!!
3. 서버에서 클라이언트로 파일 전송
## 윈도우 cmd 창에서
get (현재 서버 디렉토리 /home/client 에 있는 파일) (윈도우에 저장할 파일 이름)
4. 클라이언트에서 서버로 파일 전송
## 550 Permission denied 해결
gedit /etc/vsftpd.conf
#write enable=YES 에서 앞에 주석 '#' 제거
## 553 Could not create file 해결
chown client /home/client/
chgrp client /home/client/
## 윈도우 cmd 창에서
put (보낼 파일의 절대 경로) (우분투에 저장할 파일 이름)
일주일 동안 고민했는데 함부로 vsftpd.conf를 수정하면 안된다는 교훈을 얻었다.
ftp의 취약점을 고려해서 추후에 추가 설정을 해야겠다.