Bien le bonjour messieurs et dames,
Je suis une fois de plus coincé dans mon periple.
J'essaye tant bien que mal, d'installer un serveur VSFTPd sécurisé grâce à une connexion SSL.
Jusque là tout vas bien, sauf que maintenant, si mes users tentent de se logger sur ce dit serveur avec un client FTP tel que fillezilla, ils ont le message suivant:
Donc je vais faire un tour sur le serveur histoire de regarder les logs, et la j'ai le souci suivant:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Erreur : GnuTLS error -8: A record packet with illegal version was received. Erreur : Impossible d'établir une connexion au serveur
Sous vsftpd.log, J'ai bien mon user authentifié:
MAIS sous PAM ce n'est pas le même résultat:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 Wed Jun 1 09:11:33 2011 [pid 2] CONNECT: Client "XX.XXX.XXX.XXX" Wed Jun 1 09:11:33 2011 [pid 2] FTP response: Client "XX.XXX.XXX.XXX", "220 Welcome to Geka-telecom FTP service." Wed Jun 1 09:11:33 2011 [pid 2] FTP command: Client "XX.XXX.XXX.XXX", "AUTH TLS" Wed Jun 1 09:11:33 2011 [pid 2] FTP response: Client "XX.XXX.XXX.XXX", "234 Proceed with negotiation." Wed Jun 1 09:11:33 2011 [pid 2] FTP command: Client "XX.XXX.XXX.XXX", "USER testusr" Wed Jun 1 09:11:33 2011 [pid 2] [testusr] FTP response: Client "XX.XXX.XXX.XXX", "331 Please specify the password." Wed Jun 1 09:11:33 2011 [pid 2] [testusr] FTP command: Client "XX.XXX.XXX.XXX", "PASS <password>" Wed Jun 1 09:11:33 2011 [pid 1] [testusr] OK LOGIN: Client "XX.XXX.XXX.XXX"
pourtant, pour moi tout est bon au niveau de pam, dont voici le fichier de conf pour VSFTPd:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 Jun 1 09:25:01 PRDFTP01 vsftpd: pam_unix(vsftpd:auth): check pass; user unknown Jun 1 09:25:01 PRDFTP01 vsftpd: pam_unix(vsftpd:auth): authentication failure; logname= uid=0 euid=0 tty=ftp ruser=testusr rhost=XX.XXX.XXX.XXX Jun 1 09:25:01 PRDFTP01 vsftpd: pam_unix(vsftpd:account): could not identify user (from getpwnam(testusr))
Pour completer un peu la chose, voici mon fichier vsftpd.conf:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 auth sufficient pam_unix.so account sufficient pam_unix.so auth required /lib64/security/pam_mysql.so verbose=0 user=vsftpdauth passwd=secret host=127.0.0.1 db=vsftpd table=users usercolumn=login passwdcolumn=password crypt=4 where=users.active=1 sqllog=yes logtable=log logmsgcolumn=message logusercolumn=login logpidcolumn=pid loghostcolumn=host logtimecolumn=time account required /lib64/security/pam_mysql.so verbose=0 user=vsftpdauth passwd=secret host=127.0.0.1 db=vsftpd table=users usercolumn=login passwdcolumn=password crypt=4 where=users.active=1 sqllog=yes logtable=log logmsgcolumn=message logusercolumn=login logpidcolumn=pid loghostcolumn=host logtimecolumn=time
Je précise que le dossier de l'utilisateur est bien créer par mes soins dans /srv/services/ftp-data/users_home/$USERNAME
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132 # Listen any IPV4 Requests. listen=YES listen_port=21 # Allow anonymous FTP? (Beware - allowed by default if you comment this out). anonymous_enable=NO # Uncomment this to allow local users to log in. local_enable=YES # Default User Folder. user_sub_token=$USER local_root=/srv/services/ftp-data/users_home/$USER # Uncomment this to enable any form of FTP write command. write_enable=NO # 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 # Virtual Users activation: guest_enable=YES guest_username=vsftpd #userlist_enable=YES # Virtual Users Configuration File: user_config_dir=/srv/services/ftp-data/users_config/user_configs # Virtual Users List: #userlist_file=/srv/services/ftp-data/users_config/user_list # Virtual Users Allowed/Denied: #userlist_deny=YES # Virtual Users Local Rights: virtual_use_local_privs=YES # Maximum data transfer rate permitted: local_max_rate=20480 # Maximum clients at a time: max_clients=20 # Maximum clients from the same IP: max_per_ip=2 # 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 # Make sure PORT transfer connections originate from port 20 (ftp-data). connect_from_port_20=YES # Where the logs are store log_ftp_protocol=YES # You may change the default value for timing out an idle session. idle_session_timeout=120 # You may change the default value for timing out a data connection. data_connection_timeout=120 # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. nopriv_user=vsftpd # You may fully customise the login banner string: ftpd_banner=Welcome to FTP service. # You may specify a file of disallowed anonymous e-mail addresses. Apparently # useful for combatting certain DoS attacks. #deny_email_enable=YES # (default follows) #banned_email_file=/etc/vsftpd.banned_emails # 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 # You may specify an explicit list of local users to chroot() to their home # directory. If chroot_local_user is YES, then this list becomes a list of # users to NOT chroot(). #chroot_list_enable=YES # (default follows) #chroot_list_file=/etc/vsftpd.chroot_list # # # You may activate the "-R" option to the builtin ls. This is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. #ls_recurse_enable=YES # Debian customization # # Some of vsftpd's settings don't fit the Debian filesystem layout by # default. These settings are more Debian-friendly. # # 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=vsftpd # SSL Options Configuration: ssl_enable=YES #allow_anon_ssl=NO #force_local_data_ssl=YES force_local_logins_ssl=YES ssl_tlsv1=YES ssl_sslv2=YES ssl_sslv3=YES # This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file=/srv/services/ftp-data/private_config/certificat.pem rsa_private_key_file=/srv/services/ftp-data/private_config/privatekey.pem
Mon user vsftpd est un user system sans mot de passe, sans home sans autorisation de login
il fait partie du groupe system nommé vsftpd.
Tous les dossier sous /srv/services/ftp-data sont chowner par: chown -R root:root avec des privileges en mode 755.
Bref, je suis confus comme on dit, et si quelqu'un peux m'aider à résoudre ce souci, je suis preneur, et je vous ferais un tuto complet
Si ça peux aider, je suis sous DEBIAN SQUEEZE 6.0.0 / MYSQL 5.1 / VSFTPd 2.3.2-3
Partager