[résolu] problème avec vsftpd

salut,

donc j’ai essayé un tuto de configuration sauf que quand j’essaye de me connecter en localhost j’ai le message suivant :

jle@localhost:~$ ftp localhost 21 ftp: connect to address 127.0.0.1: Connection refused Trying 192.168.1.2... ftp: connect: Connection refused ftp>

mon ficher de config :

[code]# Example config file /etc/vsftpd.conf

The default compiled in settings are fairly paranoid. This sample file

loosens things up a bit, to make the ftp daemon more usable.

Please see vsftpd.conf.5 for all compiled in defaults.

READ THIS: This example file is NOT an exhaustive list of vsftpd options.

Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd’s

capabilities.

Run standalone? vsftpd can run either from an inetd or as a standalone

daemon started from an initscript.

listen=YES

Run standalone with IPv6?

Like the listen parameter, except vsftpd will listen on an IPv6 socket

instead of an IPv4 one. This parameter and the listen parameter are mutually

exclusive.

#listen_ipv6=YES

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

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

Uncomment this to allow the anonymous FTP user to upload files. This only

has an effect if the above global write enable is activated. Also, you will

obviously need to create a directory writable by the FTP user.

anon_upload_enable=NO

Uncomment this if you want the anonymous FTP user to be able to create

new directories.

anon_mkdir_write_enable=NO
anon_other_write_enable=NO

guest_enable=YES
guest_usename=virtual

max_clients=200
max_per_ip=4

Activate directory messages - messages given to remote users when they

go into a certain directory.

#dirmessage_enable=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

If you want, you can arrange for uploaded anonymous files to be owned by

a different user. Note! Using “root” for uploaded files is not

recommended!

#chown_uploads=YES
#chown_username=whoever

You may override where the log file goes if you like. The default is shown

below.

xferlog_file=/var/log/vsftpd.log

If you want, you can have your log file in standard ftpd xferlog format

#xferlog_std_format=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

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=ftpsecure

Enable this and the server will recognise asynchronous ABOR requests. Not

recommended for security (the code is non-trivial). Not enabling it,

however, may confuse older FTP clients.

#async_abor_enable=YES

By default the server will pretend to allow ASCII mode but in fact ignore

the request. Turn on the below options to have the server actually do ASCII

mangling on files when in ASCII mode.

Beware that on some FTP servers, ASCII support allows a denial of service

attack (DoS) via the command “SIZE /big/file” in ASCII mode. vsftpd

predicted this attack and has always been safe, reporting the size of the

raw file.

ASCII mangling is a horrible feature of the protocol.

#ascii_upload_enable=YES
#ascii_download_enable=YES

You may fully customise the login banner string:

#ftpd_banner=Welcome to blah 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

This string is the name of the PAM service vsftpd will use.

pam_service_name=vsftpd

This option specifies the location of the RSA certificate to use for SSL

encrypted connections.

rsa_cert_file=/etc/ssl/certs/vsftpd.pem[/code]

le tuto :

http://www.andesi.org/index.php?node=121#A5

et j’ai ce message quand j’arrette vsftpd :

localhost:/home/jle# /etc/init.d/vsftpd stop Stopping FTP server: vsftpdNo /usr/sbin/vsftpd found running; none killed. . localhost:/home/jle# /etc/init.d/vsftpd start Starting FTP server: vsftpd.

normal ?

ce forum est francophone.

et ou est le problème ?

Ton titre.
Désolé, pas d’idée sur ton pb lui même.

dsl je vais le changer je voulais faire dans l’originalité ^^

[quote=“vlotho”]dsl je vais le changer je voulais faire dans l’originalité ^^[/quote]Remarque qu’il y a déjà eu pleins de sujet citant le message d’erreur >en anglais< dans le titre.
J’ai été tatillon. :wink:

Que donne successivement

netstat -tpl

ps xa | grep ftp

??

localhost:/home/jle# netstat -tpl Connexions Internet actives (seulement serveurs) Proto Recv-Q Send-Q Adresse locale Adresse distante Etat PID/Program name tcp 0 0 *:2080 *:* LISTEN - tcp 0 0 *:nfs *:* LISTEN - tcp 0 0 *:4935 *:* LISTEN 2 645/rpc.statd tcp 0 0 localhost:mysql *:* LISTEN 2 324/mysqld tcp 0 0 *:netbios-ssn *:* LISTEN 2 969/smbd tcp 0 0 *:sunrpc *:* LISTEN 1 958/portmap tcp 0 0 *:www *:* LISTEN 2 694/apache2 tcp 0 0 *:auth *:* LISTEN 2 582/inetd tcp 0 0 localhost:ipp *:* LISTEN 2 409/cupsd tcp 0 0 localhost:ipp *:* LISTEN 2 409/cupsd tcp 0 0 *:632 *:* LISTEN 2 572/rpc.mountd tcp 0 0 localhost:smtp *:* LISTEN 2 525/exim4 tcp 0 0 *:microsoft-ds *:* LISTEN 2 969/smbd localhost:/home/jle# ps xa | grep ftp 5536 pts/1 R+ 0:00 grep ftp

mon port 21 est pas ouvert jesuppose ? ^^

ton serveur ftp ne semble pas tourner.
Tu n’as rien dans les logs ?

[quote=“mattotop”]ton serveur ftp ne semble pas tourner.
Tu n’as rien dans les logs ?[/quote]
+1 dont /var/log/daemon.log et /var/log/syslog

je vous ai mis la derniere page de chacun mais je ne vois rien de suspect

syslog :

Nov 5 15:01:56 localhost -- MARK -- Nov 5 15:09:01 localhost /USR/SBIN/CRON[4150]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 15:17:01 localhost /USR/SBIN/CRON[4423]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Nov 5 15:23:27 localhost gconfd (root-4617): démarrage (version 2.16.1), pid 4617 utilisateur « root » Nov 5 15:23:27 localhost gconfd (root-4617): Adresse « xml:readonly:/etc/gconf/gconf.xml.mandatory » résolue vers une source de configuration en lecture seule à la position 0 Nov 5 15:23:27 localhost gconfd (root-4617): Adresse « xml:readwrite:/root/.gconf » résolue vers une source de configuration accessible en écriture à la position 1 Nov 5 15:23:27 localhost gconfd (root-4617): Adresse « xml:readonly:/etc/gconf/gconf.xml.defaults » résolue vers une source de configuration en lecture seule à la position 2 Nov 5 15:23:27 localhost gconfd (root-4617): Adresse « xml:readonly:/var/lib/gconf/debian.defaults » résolue vers une source de configuration en lecture seule à la position 3 Nov 5 15:23:27 localhost gconfd (root-4617): Adresse « xml:readonly:/var/lib/gconf/defaults » résolue vers une source de configuration en lecture seule à la position 4 Nov 5 15:39:01 localhost /USR/SBIN/CRON[5006]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 16:02:02 localhost -- MARK -- Nov 5 16:09:01 localhost /USR/SBIN/CRON[5748]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 16:17:02 localhost /USR/SBIN/CRON[5951]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Nov 5 16:39:01 localhost /USR/SBIN/CRON[6485]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 17:02:05 localhost -- MARK -- Nov 5 17:09:01 localhost /USR/SBIN/CRON[7215]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 17:17:01 localhost /USR/SBIN/CRON[7417]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) Nov 5 17:39:01 localhost /USR/SBIN/CRON[7949]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 18:02:05 localhost -- MARK -- Nov 5 18:09:01 localhost /USR/SBIN/CRON[8679]: (root) CMD ( [ -d /var/lib/php5 ] && find /var/lib/php5/ -type f -cmin +$(/usr/lib/php5/maxlifetime) -print0 | xargs -r -0 rm) Nov 5 18:17:01 localhost /USR/SBIN/CRON[8881]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)

daemon.log :

Nov 4 13:24:36 localhost mysqld_safe[7064]: started Nov 4 13:24:36 localhost mysqld[7067]: 071104 13:24:36 InnoDB: Started; log sequence number 0 43655 Nov 4 13:24:36 localhost mysqld[7067]: 071104 13:24:36 [Note] /usr/sbin/mysqld: ready for connections. Nov 4 13:24:36 localhost mysqld[7067]: Version: '5.0.32-Debian_7etch1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Debian etch distribution Nov 4 13:24:37 localhost /etc/mysql/debian-start[7106]: Upgrading MySQL tables if necessary. Nov 4 13:24:41 localhost /etc/mysql/debian-start[7114]: Checking for crashed MySQL tables. Nov 5 02:18:29 localhost init: Switching to runlevel: 0 Nov 5 02:18:37 localhost NetworkManager: <WARNING>^I nm_signal_handler (): Caught signal 15, shutting down normally. Nov 5 02:18:37 localhost NetworkManager: <information>^ICaught terminiation signal Nov 5 02:18:37 localhost NetworkManager: <debug info>^I[1194225517.654099] nm_print_open_socks (): Open Sockets List: Nov 5 02:18:37 localhost NetworkManager: <debug info>^I[1194225517.654990] nm_print_open_socks (): Open Sockets List Done. Nov 5 02:18:39 localhost mysqld[7067]: 071105 2:18:39 [Note] /usr/sbin/mysqld: Normal shutdown Nov 5 02:18:39 localhost mysqld[7067]: Nov 5 02:18:40 localhost mysqld[7067]: 071105 2:18:40 InnoDB: Starting shutdown... Nov 5 02:18:41 localhost mysqld[7067]: 071105 2:18:41 InnoDB: Shutdown completed; log sequence number 0 43655 Nov 5 02:18:41 localhost mysqld[7067]: 071105 2:18:41 [Note] /usr/sbin/mysqld: Shutdown complete Nov 5 02:18:41 localhost mysqld[7067]: Nov 5 02:18:41 localhost mysqld_safe[26579]: ended Nov 5 12:41:59 localhost mysqld_safe[2322]: started Nov 5 12:42:01 localhost mysqld[2325]: 071105 12:42:01 InnoDB: Started; log sequence number 0 43655 Nov 5 12:42:01 localhost mysqld[2325]: 071105 12:42:01 [Note] /usr/sbin/mysqld: ready for connections. Nov 5 12:42:01 localhost mysqld[2325]: Version: '5.0.32-Debian_7etch1-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 Debian etch distribution Nov 5 12:42:03 localhost /etc/mysql/debian-start[2380]: Upgrading MySQL tables if necessary. Nov 5 12:42:13 localhost /etc/mysql/debian-start[2432]: Checking for crashed MySQL tables. Nov 5 12:42:17 localhost NetworkManager: <information>^Istarting... Nov 5 12:42:27 localhost rpc.statd[2645]: Version 1.0.10 Starting Nov 5 14:27:20 localhost gdm[2637]: Impossible d'identifier l'utilisateur Nov 5 14:27:35 localhost last message repeated 2 times Nov 5 14:28:24 localhost NetworkManager: <information>^IUpdating allowed wireless network lists. Nov 5 14:28:24 localhost NetworkManager: <WARNING>^I nm_dbus_get_networks_cb (): error received: org.freedesktop.NetworkManagerInfo.NoNetworks - There are no wireless networks stored..

Voyons…
Un extrait au moment ou tu redémarres ton serveur ftp serait plus pertinent, plutot que la fin.

bein justement j’ai stop , start juste avant

le truc c’est dans le fichier de config il y a ca :

[code]# You may override where the log file goes if you like. The default is shown

below.

xferlog_file=/var/log/vsftpd.log[/code]

sauf qu’il existe pas dans le repertoire de log

peut etre faudrai t’il que je le cré manuellement

[quote=“mattotop”]Ton titre.
Désolé, pas d’idée sur ton pb lui même.[/quote]
Oh mais moi j’aurai honte à ta place tu sais … ?
Une leçon d’histoire:

usinagaz pourquoi tu me dis ca ? quel rapport avec mon problème ? tes hs la :stuck_out_tongue:

quote="vlotho"
peut etre faudrai t’il que je le cré manuellement[/quote]+1. En root

touch /var/log/vsftpd.log chown vfstpd.vfstpd /var/log/vsftpd.log chmod 0660 /var/log/vsftpd.log

quand je fais le

il me dit usager invalide … je pense qu’il faut peut être le créé dans passwd … aimerais confirmation … et lignes de commandes éventuellement :slightly_smiling:

non, il faut prendre le user sous lequel tourne vsftpd pour qu’il ait accès au fichier. C’est peut être root, remarques. Regardes dans /etc/password s’il n’y a pas eu un user créé (peut être aussi bêtement vfstp).
Sinon, au pire, mets le fichier temporairement en 0666 le temps de résoudre le pb.

je ne vois pas de user qui serait lié a vsftpd !! c’est bisare les erreurs que j’ai quand même … mysqld … vsftpd …

bon bein même en créant le fichier en 0666 le log ne se rempli pas quand je redemarre le serveur vsftpd …

j’ai regardé un peu dans tout les log je vois rien du tout ce rapportant à vsftpd …

bon en relisant le fichier de config je pense que je suis sur que xferlog correspond au log des upload/download et d’une le xferlog n’était pas actif alors que le chemin était renseigné et de deux ce log ne peu rien résoudre à mon problème j’ai donc recommenté le chemin du xferlog.

quote=“vlotho” c’est bisare les erreurs que j’ai quand même … mysqld … vsftpd …
(…)[/quote]Mais tu n’as pas de pb sur mysql, ou en vois tu ?