Proftpd chrooter un utilisateur

Fermé
pandageek Messages postés 359 Date d'inscription samedi 6 août 2011 Statut Membre Dernière intervention 27 mai 2014 - 22 mai 2014 à 22:15
pandageek Messages postés 359 Date d'inscription samedi 6 août 2011 Statut Membre Dernière intervention 27 mai 2014 - 27 mai 2014 à 21:26
bonjour à vous,
je cherche à chrooter un utilisateur sftp dans son dossier home personnel, j'ai pour cela modifié le fichier /etc/proftpd/proftpd.conf en dé-commentant et modifiant cette ligne :
DefaultRoot                     ~ user
Avec user l'utilisateur concerné comme indiqué ici :
http://www.proftpd.org/docs/directives/linked/config_ref_DefaultRoot.html

mais même avec un redémarrage du serveur, l'utilisateur en question peut remonter arborescence.
j'aimerai qu'il n'ai accès qu'à son home
Merci

3 réponses

zipe31 Messages postés 36402 Date d'inscription dimanche 7 novembre 2010 Statut Contributeur Dernière intervention 27 janvier 2021 6 415
23 mai 2014 à 10:48
Salut,

Extrait :

Resolving ~
The DefaultRoot directive is commonly used to restrict or "jail" users into specific directories, usually their individual home directories. This is done via:

DefaultRoot ~

where the tilde (~) is expanded to the home directory of the logging in user. Now, when proftpd is resolving the tilde, it switches to the privileges of the logging-in user and attempts to resolve the home directory. This ensures that the user will, once restricted to that directory, will have the ability to see files and move around. So if using the tilde does not appear to be working in your configuration, double-check that the permissions on the home directory of the user in question at least allow that user to change into the directory (which requires execute permission on the home directory). If proftpd finds that the permissions are too restrictive, an error message like:

chroot("~"): No such file or directory

will be logged.

Commence par là...
0
pandageek Messages postés 359 Date d'inscription samedi 6 août 2011 Statut Membre Dernière intervention 27 mai 2014 4
25 mai 2014 à 21:15
Merci pour la réponse :)

Mais l'utilisateur en question a tous les droits sur son dossier, et /var/log/proftpd/proftpd.log est vide.
proftpd logue t il ses erreurs autre part?

ps : j'ai remarqué que l'utilisateur, lorsqu'il se connecte en FTP, est limité au dossier /var (son home est placé dans /var/www/) se peut il que la restriction se limite à cela et ne cache pas les dossiers parents?
0
pandageek Messages postés 359 Date d'inscription samedi 6 août 2011 Statut Membre Dernière intervention 27 mai 2014 4
27 mai 2014 à 21:26
up?
0