Pages : 1
#1 Le 05/07/2006, à 22:17
- FMaz008
[RESOLU] PureFTPD + User manager for PureFTPD
Bon, j'essaie d'installer ces deux trucs.
Voici ce que j'ai fait:
1) Télécharger pure-ftpd-1.0.21.tar.gz dans /home
2) tar -zxvf pure-ftpd-1.0.21.tar.gz
3) cd pure-ftpd-1.0.21
4) ./configure --with-mysql
5) make install-strip
6) Selon le wizard de user manager, je créer le fichier suivant: nano /etc/pureftpd-mysql.conf
############################################################################
# #
# PureFTPd MySQL configuration file. #
# Generated by the installation wizard for the 'User manager for PureFTPd' #
# See http://machiel.generaal.net for more info #
# or read the README.MySQL for explanations of the syntax. #
# #
############################################################################
# Optional : MySQL server name or IP. Don't define this for unix sockets.
MYSQLServer 127.0.0.1
# Optional : MySQL port. Don't define this if a local unix socket is used.
# MYSQLPort 3306
# Optional : define the location of mysql.sock if the server runs on this host.
MYSQLSocket /tmp/mysql.sock
# Mandatory : user to bind the server as.
MYSQLUser <user>
# Mandatory : user password. You must have a password.
MYSQLPassword <pass>
# Mandatory : database to open.
MYSQLDatabase <database>
# Mandatory : how passwords are stored
# Valid values are : "cleartext", "crypt", "md5" and "password"
# ("password" = MySQL password() function)
# You can also use "any" to try "crypt", "md5" *and* "password"
MYSQLCrypt md5
# In the following directives, parts of the strings are replaced at
# run-time before performing queries :
#
# \L is replaced by the login of the user trying to authenticate.
# \I is replaced by the IP address the user connected to.
# \P is replaced by the port number the user connected to.
# \R is replaced by the IP address the user connected from.
# \D is replaced by the remote IP address, as a long decimal number.
#
# Very complex queries can be performed using these substitution strings,
# especially for virtual hosting.
# Query to execute in order to fetch the password
MYSQLGetPW SELECT Password FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Query to execute in order to fetch the system user name or uid
MYSQLGetUID SELECT Uid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : default UID - if set this overrides MYSQLGetUID
#MYSQLDefaultUID 1000
# Query to execute in order to fetch the system user group or gid
MYSQLGetGID SELECT Gid FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : default GID - if set this overrides MYSQLGetGID
#MYSQLDefaultGID 1000
# Query to execute in order to fetch the home directory
MYSQLGetDir SELECT Dir FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Optional : query to get the maximal number of files
# Pure-FTPd must have been compiled with virtual quotas support.
# MySQLGetQTAFS SELECT QuotaFiles FROM users WHERE User="\L"
# Optional : query to get the maximal disk usage (virtual quotas)
# The number should be in Megabytes.
# Pure-FTPd must have been compiled with virtual quotas support.
# MySQLGetQTASZ SELECT QuotaSize FROM users WHERE User="\L"
# Optional : ratios. The server has to be compiled with ratio support.
# MySQLGetRatioUL SELECT ULRatio FROM users WHERE User="\L"
# MySQLGetRatioDL SELECT DLRatio FROM users WHERE User="\L"
# Optional : bandwidth throttling.
# The server has to be compiled with throttling support.
# Values are in KB/s .
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
# Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS :
# 1) You know what you are doing.
# 2) Real and virtual users match.
# MySQLForceTildeExpansion 1
# If you upgraded your tables to transactionnal tables (Gemini,
# BerkeleyDB, Innobase...), you can enable SQL transactions to
# avoid races. Leave this commented if you are using the
# traditionnal MyIsam databases or old (< 3.23.x) MySQL versions.
# MySQLTransactions On
^^ évidemment j'ai remplacer <user> <pass> et <database> par les vrai valeurs. J'ai aussi essayé de changé le path vers le socket pour: /var/run/mysqld/mysqld.sock
7) cd /home/pure-ftpd-1.0.21/configuration-file
8) chmod 755 pure-config.pl
9) ./pure-config.pl pure-ftpd.conf ... ce qui retourne:
/usr/local/sbin/pure-ftpd -A -c50 -B -C8 -D -fftp -H -I15 -lmysql:/etc/pureftpd-mysql.conf -L2000:8 -m4 -s -U133:022 -u100 -k99 -Z
421 Configuration error: Invalid SQL configuration file: /etc/pureftpd-mysql.conf
Je suis pris, je ne sais plus quoi faire :-\
Dernière modification par FMaz008 (Le 06/07/2006, à 06:31)
Hors ligne
#2 Le 05/07/2006, à 22:56
- dexinou
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Tu devrais installer pure-ftpd à partir d'aptitude, synaptic
# apt-get install pure-ftpd-mysql pure-ftpd-common
Dernière modification par dexinou (Le 05/07/2006, à 22:56)
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
#3 Le 05/07/2006, à 23:01
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Le package existe pas :-\
root@lego:/home/pure-ftpd-1.0.21/configuration-file# apt-get install pure-ftpd-mysql pure-ftpd-common
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances... Fait
E: Impossible de trouver le paquet pure-ftpd-mysql
root@lego:/home/pure-ftpd-1.0.21/configuration-file#
Hors ligne
#4 Le 06/07/2006, à 03:33
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Aucune(s) idée(s) ?
Hors ligne
#5 Le 06/07/2006, à 03:35
- Stemp
Re : [RESOLU] PureFTPD + User manager for PureFTPD
C'est dans les dépôts Universe : http://doc.ubuntu-fr.org/applications/apt/depots
«La violence n'a jamais rien réglé» Gengis Khan 1162-1227
Blog | Crunchbang Linux | Arch Linux
Hors ligne
#6 Le 06/07/2006, à 04:23
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Haha ! mega cool J'ai enfin des packages!
Bon, ce que j'ai fait:
1) apt-get install pure-ftpd-mysql pure-ftpd-common
2) Les deux dernières lignes à modifier du wizard qui étaient:
MySQLGetBandwidthUL SELECT ULBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" AND Status="1" AND (Ipaddress = "*" OR Ipaddress LIKE "\R")
^^ je l'ai au mise en commentaire, maintenant plus d'erreur au lancement de Pure-FTP. Le fichier de config est d'ailleurs dans: /etc/pure-ftpd/db/mysql.conf
3) J'ai placé la ligne de commande suivante dans /etc/rc.local:
/usr/local/sbin/pure-ftpd -A -c50 -B -C8 -D -fftp -H -I15 -lmysql:/etc/pure-ftpd/db/mysql.conf -L2000:8 -m4 -s -U133:022 -u100 -k99 -Z
Et je peux maintenant créer pleins d'utilisateurs directement via une interface web cool !
Hors ligne
#7 Le 06/07/2006, à 05:49
- Stemp
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Un petit [Résolu] alors ? (modifie ton premier message)
«La violence n'a jamais rien réglé» Gengis Khan 1162-1227
Blog | Crunchbang Linux | Arch Linux
Hors ligne
#8 Le 06/07/2006, à 05:53
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Hum presque, j'arrive pas à créer de dossier lorsque je me connecte en FTP.
C'est possible de donner PLEIN accès au dossier /home/ à un utilisateur ?
si j'associe un compte FTP à un dossier www-data, il me dit: [R] 530 Sorry, but I can't trust you
Je peux pas mettre root non plus.
Donc en gros, j'aimerais pouvoir donner total accès à un utilisateur et restreindre les exécution seulement.
Hors ligne
#9 Le 06/07/2006, à 06:02
- Stemp
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Ok ok, ben tu y pensera quand ce sera complètement résolu alors
«La violence n'a jamais rien réglé» Gengis Khan 1162-1227
Blog | Crunchbang Linux | Arch Linux
Hors ligne
#10 Le 06/07/2006, à 06:08
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
hum, question de débutant, quelle serait la commande pour créer un utilisateur nommé 'home' qui aurrait plein droit sur le dossier /home (créer/effacer/modifier/lire)
je sais que c'est la commande adduser mais j'ai un peu de difficulter à bien saisir toutes les options...
Hors ligne
#11 Le 06/07/2006, à 06:31
- FMaz008
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Bon, j'ai fait:
adduser www
je me suis trompé dans le pass (ils concordaient pas), et j'ai déplacé tout mes dossiers de /home/ dans /home/www pour avoir une structure du genre:
/home/www/mon-site.com/public_html
J'ai associé mes compte FTP à l'utilisateur www, et magie, tout est OK.
Je marque le sujet résolu, si jamais quelqu'un passe par ici et à le même problème que moi sur ce sujet mais que mes explication sont trop chaotique, bah je garde ce sujet en Abonnement, donc je recevrais un jolie email
Hors ligne
#12 Le 06/07/2006, à 09:37
- dexinou
Re : [RESOLU] PureFTPD + User manager for PureFTPD
Hum presque, j'arrive pas à créer de dossier lorsque je me connecte en FTP.
C'est possible de donner PLEIN accès au dossier /home/ à un utilisateur ?
pour créer le dossier utilisateurs de ton utilisateur virtuel tu dois placé un fichier nommé CreateHomeDir (respecte la casse) dans /etc/pure-ftpd/conf/ et lui donner la valeur yes.
Pour les chrootés : ChrootEveryone avec comme valeur yes.
Dernière modification par dexinou (Le 06/07/2006, à 13:14)
Ubuntu 9.10 64bits ext4 ® Core 2 Duo
Unix..... il y a moins bien mais c'est plus cher.
Si t'as pas compris la réponse, pose mieux ta question.
Tutoriaux Linux, apache, pure-ftpd, bind, mysql, qmail...
Hors ligne
Pages : 1