Debug School

rakesh kumar
rakesh kumar

Posted on • Updated on

xampp starting proftpd fail with password

xampp-starting-proftpd-fail-with-password

fatal: unknown configuration directive 'function' on line 44 of '/opt/lampp/etc/proftpd.conf'
Enter fullscreen mode Exit fullscreen mode

Image description

Solution

Image description

If you're encountering a problem where ProFTPD fails to start in XAMPP with a password error, there are a few steps you can try to resolve the issue.

Here's an example solution:

  1. Stop XAMPP and Apache services.
  2. Open the XAMPP Control Panel.
  3. Go to the "Config" button next to Apache and select "php.ini".
  4. Find the following line in the file:
;extension=ftp
Enter fullscreen mode Exit fullscreen mode

5.Uncomment this line by removing the semicolon at the beginning:

extension=ftp
Enter fullscreen mode Exit fullscreen mode

6.Save the changes and close the file.
7.Open the XAMPP Control Panel.
8.Go to the "Config" button next to ProFTPD and select "proftpd.conf".
9.Find the following line in the file:

AuthUserFile /Applications/XAMPP/xamppfiles/etc/ftpd.passwd
Enter fullscreen mode Exit fullscreen mode

10.Change the path to match the location of your XAMPP installation:

AuthUserFile /path/to/xampp/xamppfiles/etc/ftpd.passwd
Enter fullscreen mode Exit fullscreen mode

10.Save the changes and close the file.
11.Start XAMPP and Apache services.

Try accessing ProFTPD with your username and password, and the issue should be resolved.

Note: If the solution above does not resolve the issue, it's possible that there may be other factors causing the failure to start ProFTPD, such as a corrupt ftpd.passwd file or incorrect permissions on the file. In such cases, it may be necessary to further troubleshoot the problem to determine the cause.

what you actualy did for sudo lampp security it just generating this below little boilerplate about hash and salt, that passed in $LAMP_DIR/etc/proftpd.conf

function make_seed() {
    list($usec, $sec) = explode(' ', microtime());
    return (float) $sec + ((float) $usec * 100000);
}
srand(make_seed());
$random=rand();
$chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz./";
$salt=substr($chars,$random % 64,1).substr($chars,($random/64)%64,1);
$pass=$argv[1];
$crypted = crypt($pass,$salt);
echo $crypted."
";
Enter fullscreen mode Exit fullscreen mode

that's fine. just because your xampp php not compiled hash automaticaly to you, you can move for next step by adding php keyword after UserPassword $ftpuser <? kind like below:

UserPassword daemon <?php
        function make_seed() {
            list($usec, $sec) = explode(' ', microtime());
Enter fullscreen mode Exit fullscreen mode
    #bla-bla-bla
Enter fullscreen mode Exit fullscreen mode

dont forget in $pass=$argv[1]; just change with $pass="your password here";

then run them with your php interpreter /opt/lampp/bin/php /opt/lampp/etc/proftpd.conf

and viola

daemon gets the password "xampp"

commented out by xampp security

UserPassword daemon 2TgxE8g184G9c

UserPassword daemon dAN1WkV7r2TsU

daemon is no normal user so we have to allow users with no real shell

RequireValidShell off

daemon may be in /etc/ftpusers so we also have to ignore this file

UseFtpUsers off
dev@enigma:/opt/lampp$
you've got your new passwd UserPassword $ftpuser dAN1WkV7r2TsU

or you can just assign plain password with UserPassword $ftpuser "plain_pw_here"

Second Solution

run this command root directory

vi  /opt/lampp/etc/proftpd.conf
Enter fullscreen mode Exit fullscreen mode

And comment this function

function make_seed() {

}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)