Curl FTPS 오류: 1408F10B: SSL 루틴: ssl3_get_record: 잘못된 버전 번호

Curl FTPS 오류: 1408F10B: SSL 루틴: ssl3_get_record: 잘못된 버전 번호

관련 질문을 보았지만 그 중 어느 것도 내 문제를 해결하지 못했습니다.

컬을 사용하여 vsftpd를 실행하는 EC2 서버의 FTPS 서버에서 내 dmz의 서버로 ftp를 통해 파일을 전송하려고 합니다.

$ curl ftps://ec2-myserver.compute.amazonaws.com --verbose --tlsv1.1
* Rebuilt URL to: ftps://ec2-myserver.us-east-2.compute.amazonaws.com/
*   Trying ip_addr...
* TCP_NODELAY set
* Connected to ec2-myserver.us-east-2.compute.amazonaws.com (ip_addr) port ---- (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: /etc/ssl/certs
* TLSv1.1 (OUT), TLS handshake, Client hello (1):
* error:1408F10B:SSL routines:ssl3_get_record:wrong version number
* Closing connection 0

Windows 서버의 Filezilla에서 파일 연결 FTPS를 얻을 수 있습니다.

모든 TLS 버전에서 동일한 오류가 발생합니다.

vsfpd 서버에서 SSL3을 활성화하려고 시도했지만 문제가 해결되지 않았습니다.

답변1

chroot 구성에서 vsftpd를 실행했는데 조용히 실패했습니다. ( /dev/logchroot에서 액세스할 수 없기 때문일까요?)

chroot_local_user=YES
local_root=public_html

나는 OK LOGIN그것을 볼 수 있지만 vsftpd.log클라이언트의 비밀번호에 사용자 이름을 보낸 후 다음 오류와 함께 실패합니다.

client% openssl s_client -connect testftps.example.org:21 --tls1_2 --starttls ftp -quiet
depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = R3
verify return:1
depth=0 CN = testftps.example.org
verify return:1
220 Welcome to TEST vsftpd FTPS service.
user ftptest
331 Please specify the password.
pass xxxxxxxx
140419419894912:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../ssl/record/ssl3_record.c:308:

vsftpd를 추적한 결과에만 문제가 드러났습니다.

server# strace -tt -ff -s500 -p `pidof vsftpd`
[...]
[pid 27164] 18:31:56.249184 access("/", W_OK) = 0
[pid 27164] 18:31:56.249386 fcntl(0, F_GETFL) = 0x2 (flags O_RDWR)
[pid 27164] 18:31:56.249599 fcntl(0, F_SETFL, O_RDWR|O_NONBLOCK) = 0
[pid 27164] 18:31:56.249763 write(0, "500 OOPS: ", 10) = 10
[pid 27164] 18:31:56.250118 write(0, "vsftpd: refusing to run with writable root inside chroot()", 58) = 58
[pid 27164] 18:31:56.250436 write(0, "\r\n", 2) = 2
[pid 27164] 18:31:56.250758 exit_group(2) = ?

따라서 수정 사항은 이지만 실제 문제 찾기가 chmod 500 ~ftptest/public_html될 수도 있습니다 .strace

관련 정보