Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 02/01/2011, à 13:21

kent2004

vftpd : emprisonner dans son /home

Bonjour,

j'aimerais que lorsqu'un utilisateur se connecte il ne puisse pas voyager dans toutes l'arborescente.

Si j'ai bien compris :

chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list

chroot_local_user doit etre sur YES, et tout ceux qui ne sont pas dans le fichier /etc/vsftpd.chroot_list sont emprisonner

Mais ca ne fonctionne pas ...

un peu d'aide ?

Merci

Hors ligne

#2 Le 02/01/2011, à 14:00

redisded

Re : vftpd : emprisonner dans son /home

Bonjour,

j'ai déja rencontré ce pb avec la doc :

http://forum.ubuntu-fr.org/viewtopic.php?id=284273

en fait, les user présents dans le chroot_list seront ceux exempts de chrootage.

Cordialement.

Hors ligne

#3 Le 02/01/2011, à 14:08

kent2004

Re : vftpd : emprisonner dans son /home

redisded a écrit :

Bonjour,

j'ai déja rencontré ce pb avec la doc :

http://forum.ubuntu-fr.org/viewtopic.php?id=284273

en fait, les user présents dans le chroot_list seront ceux exempts de chrootage.

Cordialement.

Donc si personne ne doit etre présent dans le chroot_list pour que PERSONNE ne sort de son dossier perso ?

Ca ne fonctionne pas ...

Hors ligne

#4 Le 02/01/2011, à 14:43

redisded

Re : vftpd : emprisonner dans son /home

Pas trop le temps de regarder pour le moment nt mais je jetterais un oiel d'ici une heure ou deux. Il faudra que je relise la doc un petit coup.

En attendant, si tu peut envoyer tes fichiers de conf.

cordialement.

Hors ligne

#5 Le 02/01/2011, à 14:59

kent2004

Re : vftpd : emprisonner dans son /home

mon vftpd.conf :

# 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? (Disabled by default)
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=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
#
# 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=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# 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
#
# 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.
# Note that the default log file location is /var/log/xferlog in this case.
#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_local_user=YES
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
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/private/vsftpd.pem
force_dot_files=NO
tcp_wrappers=NO
#listen_address=
#hide_file=
#anon_max_rate=
#local_max_rate=


# Options for SSL
# encrypted connections.

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

ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES

rsa_cert_file=/etc/ssl/certs/vsftpd.pem

et
chroot_list_file=/etc/vsftpd.chroot_list est vide

PS: j'ai un utilisateur user1 qui point vers /var/www et un user2 qui pointe sur son home

Dernière modification par kent2004 (Le 02/01/2011, à 15:01)

Hors ligne

#6 Le 02/01/2011, à 16:01

redisded

Re : vftpd : emprisonner dans son /home

re,

je viens de tester avec cette config, cela fonctionne pour moi.

As-tu bien créé le fichier /etc/vsftpd.chroot_list, car si celui-ci n'existe pas (et il n'a pas été créé automatiquement a l'install pour moi), le serveur refuse toute connection.

As-tu bien pensé à redemmarer le service vsftpd entre chaques manips car celle-ci ne sont pas prises en compte sans cela.

Je poste au cas ou le vsftpd.conf que je viens d'utiliser, c'est celui d'origine avec uniquement les # qui nous intéressent de supprimés.

# 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? (Disabled by default)
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=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
#
# 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=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# 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
#
# 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.
# Note that the default log file location is /var/log/xferlog in this case.
#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_local_user=YES
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
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/private/vsftpd.pem

Hors ligne

#7 Le 02/01/2011, à 16:05

kent2004

Re : vftpd : emprisonner dans son /home

Merci pour le test.

Mon problème c'est p-e le restart ...

Quand je fais

sudo /etc/init.d/vsftpd reload

il me dit :

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service vsftpd reload

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the reload(8) utility, e.g. reload vsftpd

Je comprend pas trop

Dernière modification par kent2004 (Le 02/01/2011, à 16:06)

Hors ligne

#8 Le 02/01/2011, à 16:12

redisded

Re : vftpd : emprisonner dans son /home

en fait, tu doit maintenant utiliser les commandes suivantes :

sudo start vsftpd
sudo stop vsftpd
sudo restart vsftpd

en assumant que tu soit bien sous maverick comme moi.

Hors ligne

#9 Le 02/01/2011, à 16:21

kent2004

Re : vftpd : emprisonner dans son /home

Oula, j'ai quelque chose d'étrange ...
quand je fais

sudo stop vsftpd

je sais toujours me connecté sur ton ftp avec filezilla neutral

Hors ligne

#10 Le 03/01/2011, à 15:32

kent2004

Re : vftpd : emprisonner dans son /home

Je n'y arrive toujours pas ...

Impossible d'emprisonner mes utilisateurs... De plus, lorsque je fais un sudo stop vsftpd le ftp est toujours accessible

que puis-je faire ?

/etc/init.d/vsftpd stop ..

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service vsftpd stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop vsftpd
vsftpd stop/waiting
service vsftpd stop
stop: Unknown instance 

Dernière modification par kent2004 (Le 03/01/2011, à 15:35)

Hors ligne

#11 Le 03/01/2011, à 20:18

Uggy

Re : vftpd : emprisonner dans son /home

$ sudo stop vsftpd
vsftpd stop/waiting
$ stop vsftpd
stop: Unknown instance: 
$

Autrement dit "stop: Unknown instance: " est l'erreur lorque tu cherches a couper le démon qui ne tourne pas, et ce, sans invoquer les droits root par sudo.

sudo stop vsftpd le ftp est toujours accessible

Prouve le wink
(logs vsftpd, logs clients avec "ftp -v" , résultats de ps,  etc.. )

Dernière modification par Uggy (Le 03/01/2011, à 20:20)

Hors ligne

#12 Le 03/01/2011, à 20:29

kent2004

Re : vftpd : emprisonner dans son /home

Merci :-)

Quand je dis qu'il est toujours actif, lorsque je lance filezilla, j'ai accès à mes dossiers ... donc il n'a pas été stoppé

Hors ligne

#13 Le 03/01/2011, à 21:03

Uggy

Re : vftpd : emprisonner dans son /home

kent2004 a écrit :

Merci :-)

Quand je dis qu'il est toujours actif, lorsque je lance filezilla, j'ai accès à mes dossiers ... donc il n'a pas été stoppé

Si seulement Filezilla ne faisait que client FTP... mais il fait par exemple aussi SFTP... et si au hasard openSSH tournait sur la machine, Filezilla pourrait t'afficher tes fichiers meme avec ton serveur FTP coupé...  (ce qui pourrait très bien expliquer pourquoi ta config vsftpd ne ferait pas ce que tu lui as configuré) Je dis çà.. c'est pour t'aider...

-> logs vsftpd, logs clients avec "ftp -v" , résultats de ps,  etc.

Je ne dis pas qu'il ne tourne pas.. je dis juste, qu'il faudrait nous prouver qu'il tourne (et FileZilla affiche des fichier n'est pas une preuve) wink avant de faire d'autres tests.

Dernière modification par Uggy (Le 03/01/2011, à 21:09)

Hors ligne

#14 Le 03/01/2011, à 21:09

kent2004

Re : vftpd : emprisonner dans son /home

C'est en SFTP effectivement que je tourne.
De faite, OpenSSH est installé.

Mon problème est le suivant :

J'ai modifier les fichier de configuration svftpd.conf

chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd.chroot_list

Le fichier /etc/vsftpd.chroot_list est vide.

Donc les utilisateurs du sftp ne peuvent pas sortir de leur /home .
Mais ca ne fonctionne pas :-(

Je me suis dis qu'en redémarrant vsftpd la configuration serai pris en compte ? Mais je n'arrive pas a vraiment le redémarrer (du moins avec filezilla j'ai toujours accès au sftp). Et mes utilisateurs peuvent toujours se balader partout

Hors ligne

#15 Le 03/01/2011, à 21:12

Uggy

Re : vftpd : emprisonner dans son /home

kent2004 a écrit :

C'est en SFTP effectivement que je tourne.
De faite, OpenSSH est installé.
[...]
J'ai modifier les fichier de configuration svftpd.conf

vsftpd n'est pas un serveur SFTP.

Donc si tu accèdes bien en SFTP, ca n'utilise pas vsftpd.. (mais openSSH)  et donc modifier sa conf (vsftpd)  ne représente qu'un interet très limité.

Hors ligne

#16 Le 03/01/2011, à 21:18

kent2004

Re : vftpd : emprisonner dans son /home

Je comprend plus rien sad ...
A la base, je dois faire un FTP (tout simple) pour y mettre des mises à jour d'un programme (le programme se connectera avec le bon user et mot de passe pour se mettre à jour tout seul) et un utilisateur qui pointe sur /var/www pour uploader des sites web.

Je me suis dis, autant sécurisé la chose et donc faire du SFTP (vsftpd ? étant un serveur FTP (source wikipedia) sécurisé ).
Maintenant je me retrouve avec des choses que je ne comprend pas et que je n'arrive pas a sécurisé.

Merci Uggy pour ton aide, est ce que tu peux m'expliquer ce que sont tout ca ? Que puis-je faire ?

Merci

Dernière modification par kent2004 (Le 03/01/2011, à 21:18)

Hors ligne

#17 Le 03/01/2011, à 21:23

Uggy

Re : vftpd : emprisonner dans son /home

kent2004 a écrit :

Je me suis dis, autant sécurisé la chose

Bonne idée.
Il y a principalement 2 protocoles faits pour faire du "transfert de fichier sécurisé"
- SFTP
- FTPS

Ces 2 protocoles n'ont rien a voir. (si ce n'est qu'ils servent a faire la même chose)
FTPS est la version SSL de FTP (comme HTTP et HTTPS)
SFTP est un autre protocole.

FileZilla est client de ces 2 protocoles (et meme + )

OpenSSH peut faire du SFTP (mais pas de FTPS)
vsftpd peut faire du FTPS (mais pas du SFTP)

Hors ligne

#18 Le 03/01/2011, à 21:25

Uggy

Re : vftpd : emprisonner dans son /home

a toi de voir si tu preferes utiliser FTPS ou SFTP.
Dans les 2 cas, tu peux chrooter les users.

Si tu veux faire du SFTP, modifie la conf d'OpenSSH et utilise l'option "ChrootDirectory"
Si tu veux faire du FTPS, commence par démarrer vsftpd wink

Hors ligne

#19 Le 03/01/2011, à 21:27

kent2004

Re : vftpd : emprisonner dans son /home

Si je comprend bien, je veux faire du FTPS (donc avec SSL ?)

Comment je peux faire ?

Hors ligne

#20 Le 03/01/2011, à 21:28

Uggy

Re : vftpd : emprisonner dans son /home

kent2004 a écrit :

Si je comprend bien, je veux faire du FTPS (donc avec SSL ?)

Comment je peux faire ?

commence par démarrer vsftpd (ou nous prouver qu'il tourne par les commandes demandées)

Dernière modification par Uggy (Le 03/01/2011, à 21:28)

Hors ligne

#21 Le 03/01/2011, à 21:29

kent2004

Re : vftpd : emprisonner dans son /home

Uggy a écrit :

Si tu veux faire du FTPS, commence par démarrer vsftpd wink

sudo start vsftpd ?

sudo start vsftpd
vsftpd start/running, process 8018

Hors ligne

#22 Le 03/01/2011, à 21:32

Uggy

Re : vftpd : emprisonner dans son /home

ok .. maintenant connecte toi pour commencer avec FileZilla en utilisant FTPS (et pas SFTP)

Hors ligne

#23 Le 03/01/2011, à 21:34

kent2004

Re : vftpd : emprisonner dans son /home

Connexion à XX.XX.XX.XX:990...
Statut :    Échec de la tentative de connexion avec "ECONNREFUSED - Connection refused by server".
Erreur :    Impossible d'établir une connexion au serveur

Hors ligne

#24 Le 03/01/2011, à 21:41

Uggy

Re : vftpd : emprisonner dans son /home

Il faut maintenant y aller par étape et ne pas tout modifier dans tous les sens.

le fait de chrooter dans vsftpd n'a pas d'incidence sur le partie SSL.
donc dans un 1er temps, configure vsftpd pour faire du FTP (pas FTPS) et configure le sur le port par défaut et sans chroot.
Quand ca fonctionneras tu pourras ensuite
- mettre le chroot..
- si ca fonctionne, changer de port
- si ca fonctionne, activer le SSL (et donc faire du FTPS)

Si la 1ere etape avec juste du FTP tout simple ne fonctionne pas
- poste la conf (entre balises code)
- poste les logs de vsftpd
- poste les logs du client "ftp"    "ftp -v serveur.com"

Si tu veux bruler les étapes, et tout faire d'un coup, SSL, chroot, etc.. libre a toi....

PS: je vais etre moins dispo maintenant que dans les minutes précédentes.

Dernière modification par Uggy (Le 03/01/2011, à 21:42)

Hors ligne

#25 Le 03/01/2011, à 22:13

kent2004

Re : vftpd : emprisonner dans son /home

Le FTP simple fonctionne, sauf un truc (étrange). Je dois (c'est une obligation) créer un utilisateur "betadl" (il ne peut pas avoir un autre nom). Je le crée, mais impossible de me connecté sur mon FTP avec ce nom ... je crée alors "betadll" pour tester et lui fonctionne... Comment ca se fait ?

Pour le SSL, ca ne fonctionne pas. Voici ma config

# 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? (Disabled by default)
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=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
#
# 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=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# 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
#
# 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.
# Note that the default log file location is /var/log/xferlog in this case.
#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_local_user=YES
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
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
#rsa_cert_file=/etc/ssl/private/vsftpd.pem
#force_dot_files=NO
#tcp_wrappers=NO
#listen_address=
#hide_file=
#anon_max_rate=
#local_max_rate=

# Options for SSL
# encrypted connections.

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

ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES

rsa_cert_file=/etc/ssl/certs/vsftpd.pem

Hors ligne