![vsftpd 서비스가 시작되지 않았으며 vsftpd.service 메시지가 표시됩니다: 기본 프로세스가 종료되었습니다. 코드=종료, 상태=2/INVALIDARGUMENT](https://linux55.com/image/164377/vsftpd%20%EC%84%9C%EB%B9%84%EC%8A%A4%EA%B0%80%20%EC%8B%9C%EC%9E%91%EB%90%98%EC%A7%80%20%EC%95%8A%EC%95%98%EC%9C%BC%EB%A9%B0%20vsftpd.service%20%EB%A9%94%EC%8B%9C%EC%A7%80%EA%B0%80%20%ED%91%9C%EC%8B%9C%EB%90%A9%EB%8B%88%EB%8B%A4%3A%20%EA%B8%B0%EB%B3%B8%20%ED%94%84%EB%A1%9C%EC%84%B8%EC%8A%A4%EA%B0%80%20%EC%A2%85%EB%A3%8C%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4.%20%EC%BD%94%EB%93%9C%3D%EC%A2%85%EB%A3%8C%2C%20%EC%83%81%ED%83%9C%3D2%2FINVALIDARGUMENT.png)
이 FTP 서버를 실행하기 위해 Ubuntu를 실행하는 가상 머신을 구성하기 위해 Ansible을 사용하고 있지만 vsftpd
, 설치 후 로그를 확인하면 다음과 같은 내용 journalctl -u vsftpd.service
이 표시됩니다.
Nov 20 17:49:58 my-vm systemd[1]: Starting vsftpd FTP server...
Nov 20 17:49:58 my-vm systemd[1]: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: Stopping vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd[1]: Stopped vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: Starting vsftpd FTP server...
Nov 20 17:50:06 my-vm systemd[1]: Started vsftpd FTP server.
Nov 20 17:50:06 my-vm systemd[1]: vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Nov 20 17:50:06 my-vm systemd[1]: vsftpd.service: Failed with result 'exit-code'.
제가 설정한 구성에 어떤 문제가 있는지 잘 모르겠습니다. 구성 /etc/vsftpd.conf
은 다음과 같습니다.
anonymous_enable=NO # disable anonymous login
local_enable=YES # permit local logins
write_enable=YES # enable FTP commands which change the filesystem
local_umask=022 # value of umask for file creation for local users
dirmessage_enable=YES # enable showing of messages when users first enter a new directory
xferlog_enable=YES # a log file will be maintained detailing uploads and downloads
connect_from_port_20=YES # use port 20 (ftp-data) on the server machine for PORT style connections
xferlog_std_format=YES # keep standard log file format
listen=NO # prevent vsftpd from running in standalone mode
listen_ipv6=YES # THIS DOES NOT FIX THE FOLLWING: 'journalctl -u vsftpd.service' gives: 'vsftpd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT'
pam_service_name=vsftpd # name of the PAM service vsftpd will use
userlist_enable=YES # enable vsftpd to load a list of usernames
tcp_wrappers=YES # turn on tcp wrappers
ls_recurse_enable=YES # allow to recursively inspect the file system (no problem with heavy I/O)
chroot_local_user=YES # local users limited to their home directories after login (chroot jail)
allow_writeable_chroot=YES # allow chroot jail for local users to be writable
pasv_enable=YES # enable passive connections
pasv_min_port=10000 # passive connections port range
pasv_max_port=10100 # passive connections port range
ssl_enable=YES # enable FTPS
ssl_tlsv1=YES # only TLS (not old SSL standards)
ssl_sslv2=NO # only TLS (not old SSL standards)
ssl_sslv3=NO # only TLS (not old SSL standards)
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
- FTP 서버 데몬을 제대로 실행하려면 어떻게 해야 합니까?
- 구성 파일에 문제가 있습니까?
답변1
어쩌면 이 질문에 대답하기에는 조금 늦을 수도 있지만, 나와 같은 문제를 겪고 있는 사람이라면 다음과 같이 하세요.
제 경우에는 패시브 모드를 구성했을 때 문제가 시작되었습니다. pasv_addr_resolve 및 pasv_address 항목을 추가하면 문제가 해결되었습니다. 나는 pasv_address와 서버 IP만 시도했지만 성공하지 못했습니다.
pasv_enable=YES
pasv_min_port=40000
pasv_max_port=41000
pasv_addr_resolve=YES
pasv_address=<your-domain>
또한 방화벽이 구성된 포트에서 연결을 허용하는지 확인하십시오.