# mysqladmin -u root -p create System
Next make the following file called //create.sql//:
# mysql -u root -p System < create.sql
Use this file, //create-user.sql//, to create the ftpd user and its rights:
# mysql -u root -p -h localhost < create-ftpd.sql
===== Apache2 =====
Now copy the sOLARiZ PureFTPd Manager files into your documentroot somewhere. As we are dealing with usernames and passwords I like to use https. With SuSE 9.3 the tool //gensslcert// will make the certificate for you. If you aren't using SuSE, look at the manpages for openssl. To make use of this I have created ///etc/apache2/vhosts.d/pureftpd.conf//:
# htpasswd2 -c /srv/www/htdocs/pureftpd/.htpasswd admin
===== PureFTPd Manager =====
Create a user and group called "//pureftpd//".
Extract the PureFTPd Manager files into "///srv/www/htdocs/pureftpd//".
To make use of md5 instead of crypt I changed "//index.php//" to:
PID'; echo ' | user'; echo ' | min\'s'; echo ' | state'; echo ' | file'; echo ' | IP'; echo ' | current'; echo ' | total'; echo ' | %'; echo ' | bw.'; while($x < $arraySize): $ftpwho = $ftpresult[$x]; list($pid, $user, $mins, $state, $file, $host, $port,$h, $current, $total, $percent, $bandwidth ) = explode("|", $ftpwho ); $mins = round($mins / 60); if (empty($file) or !isset($file)) { ( $file = "---" ); ++$ftp_activity; } else { if(strlen($file) > 10) $file_short = substr($file,0,10); $file = "$file_short..."; }#end else $host = gethostbyname($host); echo ' |
---|---|---|---|---|---|---|---|---|---|
' .$pid. ' | '; echo '' .$user. ' | '; echo '' .$mins. ' | '; echo '' .$state. ' | '; echo '' .$file. ' | '; echo '' .$host. ' | '; echo '' .$current. ' | '; echo '' .$total. ' | '; echo '' .$percent. ' | '; echo '' .$bandwidth. ' kb/s | '; echo '
LOGIN | '; if($viewpw) echo 'PASSWORD | '; // UA echo 'UID | GID | DIR | UL/ks | DL/ks | Quota Size | Quota Files | IP Access | Status | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
'.$R['User'].' | '; if($viewpw) echo ''.$R['Password'].' | '; echo ''.$R['Uid'].' | '; echo ''.$R['Gid'].' | '; echo ''.$R['Dir'].' | '; if($R['ULBandwidth']) echo ''.$R['ULBandwidth'].' | '; ELSE echo '- | '; if($R['DLBandwidth']) echo ''.$R['DLBandwidth'].' | '; ELSE echo '- | '; if($R['QuotaSize']) echo ''.$R['QuotaSize'].' MB | '; ELSE echo '- | '; // UA if($R['QuotaFiles']) echo ''.$R['QuotaFiles'].' | '; ELSE echo '- | '; echo ''.$R['ipaccess'].' | '; if($R['status'] == '0') echo 'inactive | '; elseif($R['status'] == '1') echo 'active | '; echo ""; echo " |
PureFTP User Management. v=$VERSION?> written by sOLARiZ [Information] |
// Nav Button stuff
echo "
|