Portál AbcLinuxu, 11. prosince 2025 11:19
ale porad se mi to nechce ptat na uzivatele v db, nema nekdo podobny problem?Nema...
Radka AUTH v konfiguraku a konfiguracni soubor pro MySQL vypada jak? V logu to neco pise? Asi by to chtelo dodat nejake informace...
############################################## # # # Sample Pure-FTPd Mysql configuration file. # # See README.MySQL for explanations. # # # ############################################## # 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 xxx # Mandatory : user password. You must have a password. MYSQLPassword xxx # Mandatory : database to open. MYSQLDatabase xxx # Mandatory : how passwords are stored # Valid values are : "cleartext", "crypt" and "password" (MySQL password() function) # You can also use "any" to try both "crypt" *and* "password" MYSQLCrypt cleartext # 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" # Query to execute in order to fetch the system user name or uid MYSQLGetUID SELECT Uid FROM users WHERE User="\L" # Query to execute in order to fetch the system user group or gid MYSQLGetGID SELECT Gid FROM users WHERE User="\L" # Query to execute in order to fetch the home directory MYSQLGetDir SELECT Dir FROM users WHERE User="\L" # 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" # MySQLGetBandwidthDL SELECT DLBandwidth FROM users WHERE User="\L" # 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
#!/bin/bash
#
# Startup script for the pure-ftpd FTP Server $Revision: 1.1 $
#
# chkconfig: 2345 85 15
# description: Pure-FTPd is an FTP server daemon based upon Troll-FTPd
# processname: pure-ftpd
# pidfile: /var/run/pure-ftpd.pid
# config: /etc/sysconfig/pure-ftpd
# Source function library.
. /etc/rc.d/init.d/functions
RETVAL=0
# Path to the pure-ftp binaries.
prog=pure-ftpd
fullpath=/usr/local/sbin/$prog
pureftpwho=/usr/local/sbin/pure-ftpwho
# You can list commandline options in /etc/sysconfig/pure-ftpd:
if [ -f /etc/sysconfig/$prog ] ; then
OPTIONS=`egrep -v "^\W*#" /etc/sysconfig/$prog | tr "\n" ' '`
fi
start() {
echo -n $"Starting $prog: "
daemon $fullpath $OPTIONS --daemonize
RETVAL=$?
[ $RETVAL = 0 ] && touch /var/lock/subsys/$prog
echo
}
stop() {
echo -n $"Stopping $prog: "
killproc $prog
RETVAL=$?
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/$prog
echo
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
condrestart)
if [ -f /var/lock/subsys/$prog ] ; then
stop
# avoid race
sleep 3
start
fi
;;
status)
status $prog
RETVAL=$?
if [ -f $pureftpwho ] && [ $RETVAL -eq 0 ] ; then
$pureftpwho
fi
;;
*)
echo $"Usage: $prog {start|stop|restart|condrestart|status}"
RETVAL=1
esac
exit $RETVAL
pure-ftpd -1 mysql:/etc/pureftpd-mysql.conf&To jsem nejak nepochopil, tam neni zadny init skript? A hlavne kdyz uz to jednou bezi, tak to podruhe na stejne IP adrese a portu fakt nepobezi. Krom toho misto jednicky by tam melo byt -l
jinak to ma v /etc/init.d/pureftpd :)Tak proc to nespoustis pres nej? Fakt nechapu co ti presne nejde a nebezi, je to zalezitost asi na pet minut. Pridej si to
/etc/sysconfig/pure-ftpd (predpokladam, ze to je globalni konfiguracni soubor) radek:
AUTH="-l unix -l mysql:/etc/pureftpd-mysql.conf"a spus to normalni pres init skript.
-l unix vynech, pokud se nepripojuji zadni uzivatele, co by nebyli v MySQL. Pokud to stale nejde, tak si precte lepe manual.
[root@server init.d]# pure-ftpd -l mysql:/etc/pureftpd-mysql.conf& [1] 10411 [root@xxx init.d]# 421 Unknown authentication method: mysql:/etc/pureftpd-mysql.conf
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.