vsftpd: error GnuTLS -15: se recibió un paquete TLS inesperado


11

¿Cómo puedo solucionar este error cuando intento conectarme al servidor ftp en filezila?

GnuTLS error -15: An unexpected TLS packet was received.

Y este error en el complemento sublime ftpsync:

ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1515)

Esta es mi configuración de vsftpd:

listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
nopriv_user=vsftpd
virtual_use_local_privs=YES
guest_enable=YES
user_sub_token=$USER
local_root=/var/www/$USER
chroot_local_user=YES
hide_ids=YES
guest_username=vsftpd

rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem

ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES

ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO

require_ssl_reuse=NO
ssl_ciphers=HIGH

Respuestas:


11

Intenté agregar una línea a mi archivo de configuración. Abre la configuración aquí:

sudo nano /etc/vsftpd.conf

Y pon esta línea en la parte inferior:

allow_writeable_chroot=YES

Luego, reinicie el servicio:

sudo service vsftpd restart

Eso me lo arregla.


Esto también funciona para Centos7 y vsftpd 3.0.2.
Putnik

4

Es posible que tenga un error que no tiene relación con SSL.

  1. Intenta desactivar SSL ( ssl_enable=NO)
  2. Conéctese con su cliente FTP favorito.

Entonces probablemente veas el error real.

Es por eso que la respuesta Francisc IB no tiene relación con SSL.


Eso es para mí la mejor respuesta: cables de configuración malas a la GnuTLS -15errror, y deshabilitar TLS da mucho más apropiada la información
lauhub

0

Extrañamente para mí, este problema surgió al intentarlo lsdespués de iniciar sesión.

Resultó ser que lo había desinstalado httpda favor nginxy la carpeta que estaba usando era propiedad apache:apachey el usuario fue eliminado cuando lo eliminé httpd. Hice chconlos directorios nginx:nginxy luego reemplacé al usuario en estas líneas en mi archivo de configuración: guest_username=nginx nopriv_user=nginx

Esperemos que esto ayude a alguien porque los mensajes de error no fueron útiles en absoluto.


0

Encontré muchas respuestas confusas. Voy a publicar un

/etc/vsftpd.conf

eso funcionó perfectamente para mí en Ubuntu 18.04 usando fileZilla como cliente el 2019-09-04. El FTPS se implementa en una instancia de EC2 regulada por un grupo de seguridad muy estricto que solo permite el acceso de IPS públicos específicos.

# FTPS Shim TLS configuration /etc/vsftpd.conf
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
listen=YES
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=NO
listen_port=38250
ftp_data_port=38255
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
# Uncomment this to allow local users to log in.
local_enable=YES
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
# If enabled, vsftpd will display directory listings with the time
# in  your  local  time  zone.  The default is to display GMT. The
# times returned by the MDTM FTP command are also affected by this
# option.
use_localtime=YES
# Activate logging of uploads/downloads.
xferlog_enable=YES
# If you want, you can have your log file in standard ftpd xferlog format.
# Note that the default log file location is /var/log/xferlog in this case.
xferlog_std_format=NO
# You may override where the log file goes if you like. The default is shown below.
xferlog_file=/var/log/vsftpd.log
log_ftp_protocol=YES
debug_ssl=YES
# You may change the default value for timing out an idle session.
idle_session_timeout=600
# You may change the default value for timing out a data connection.
data_connection_timeout=120
# You may fully customise the login banner string:
ftpd_banner=Welcome to Read-Only FTPS Shim service.
# You may restrict local users to their home directories.  See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
chroot_local_user=YES
allow_writeable_chroot=YES
# This option should be the name of a directory which is empty.  Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
secure_chroot_dir=/var/run/vsftpd/empty
# This string is the name of the PAM service vsftpd will use.
pam_service_name=ftp
# FTPS Passive Mode. -Define port range for passive mode connections
pasv_enable=Yes
pasv_min_port=10100
pasv_max_port=10110
ssl_enable=YES
# force client to use TLS when logging in
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
require_ssl_reuse=NO
ssl_ciphers=HIGH
# specify TSL certificate/private key
rsa_cert_file=/etc/ssl/certs/fullchain.pem
rsa_private_key_file=/etc/ssl/private/privkey.pem
force_local_logins_ssl=YES
force_anon_logins_ssl=YES
# Uncomment this to indicate that vsftpd use a utf8 filesystem.
utf8_filesystem=YES
# Users
userlist_enable=YES
userlist_file=/etc/vsftpd.user_list
userlist_deny=NO

0

Me encontré con este mismo problema. Otro hilo desaconseja establecer allow_writeable_chroot = YES por razones de seguridad, es decir, para mitigar un "ATAQUE DE BESTIA GRANDE".

Establecer allow_writeable_chroot = YES significa que vsftpd debería permitir la situación en la que el usuario puede escribir en el directorio de inicio del usuario. En cambio, por razones de seguridad, cambié los permisos en la carpeta raíz del usuario de 777 a 555.

Original: drwxrwxrwx / home / ftpuser /

Cambiado a: dr-xr-xr-x / home / ftpuser /

Esto hizo que el directorio personal del usuario NO pudiera ser escrito por el usuario y, por lo tanto, no tuve que usar el parámetro allow_writeable_chroot = YES . Esto está bien (y es más seguro) para mi situación, ya que tengo una estructura de directorios preestablecida y de todos modos no quiero que el usuario cree nuevos archivos o directorios en su carpeta raíz.

Lo descubrí cuando cambié el directorio de inicio a / var / ftp a través del parámetro local_root = [ruta] para vsftpd y funcionó sin tener que establecer allow_writeable_chroot = YES . Esta carpeta / var / ftp es (755) pero es propiedad de root y, por lo tanto, no es escribible por ftpuser.

Al usar nuestro sitio, usted reconoce que ha leído y comprende nuestra Política de Cookies y Política de Privacidad.
Licensed under cc by-sa 3.0 with attribution required.