How to fix “PHP Warning: ftp_login(): Login authentication failed”

grof

Member
Oct 6, 2019
12
0
1
maribor
cPanel Access Level
Website Owner
I use centos 7 with cPanel.
I have installed Open Game Panel.
So the panel is installed /home/user/public_html/panel. With subdomain panel.ubc-cs.net.
After that i create new Counter Strike server and tried to login from ftp and i see this error:
AN ERROR HAS OCCURED Unable to login to FTP server 144.91.80.0 with username 80. Are you sure your username and password are correct? Please contact your ISP helpdesk or system administrator for help..
After that i check the error logs on /home/user/logs/panel_ubc-cs_net.php.error.log and now here i see this error:
[12-Oct-2019 14:47:59 Europe/Paris] PHP Warning: ftp_login(): Login authentication failed in /home/ubc/public_html/panel/modules/ftp/includes/filesystem.inc.php on line 61
 

grof

Member
Oct 6, 2019
12
0
1
maribor
cPanel Access Level
Website Owner
I don't know anything about Open Game Panel, but FTP in general runs on port 21 not port 80. I would try logging in to port 21.
Hi.
Thanks for your answer, 80 is the username the port is 21, default.
When i create server then agent give the next username, 80, 81, 82...
so the problem is php warning
 

grof

Member
Oct 6, 2019
12
0
1
maribor
cPanel Access Level
Website Owner
I don't think your software is going to create users that you could use with ftp.
Before centos i use ubuntu, now i change to centos only beacuse cPanel.
When i install on ubuntu Open Game Panel i didnt have problem with ftp, so when i create the game server, ftp work without any problem.
When i create server then automatically server create home for server.
ex: home/ogp_agent/OGP_User_Files/1.
This number 1 is also username for ftp, and i dont need to change nothing but even if change ftp work, and now on centos i cant change no username no password, when i try to change something, then i see this error:
Code:
Error ocurred on remote server, FTP password can not be changed.
The logs says this error:
Code:
Europe/Paris] PHP Warning: ftp_login(): Login authentication failed in /home/ubc/public_html/panel/modules/ftp/includes/filesystem.inc.php on line 61
and this is a line of error 61 on include/filesystem.inc.php:
Code:
60.// Login with username and password
61.     $login_result = ftp_login($conn_id, $net2ftp_globals["username"], $net2ftp_password);
62.     if ($login_result == false) {
63.         $errormessage = __("Unable to login to FTP server <b>%1\$s</b> with username <b>%2\$s</b>.<br /><br />Are you sure your username and password are correct? Please contact your ISP helpdesk or system administrator for help.<br />", $net2ftp_globals["ftpserver"], $net2ftp_globals["username"]);
64.        setErrorVars(false, $errormessage, debug_backtrace(), __FILE__, __LINE__);
65.        return false;
66.    }
 

grof

Member
Oct 6, 2019
12
0
1
maribor
cPanel Access Level
Website Owner
Code:
60.// Login with username and password
61.     $login_result = ftp_login($conn_id, $net2ftp_globals["username"], $net2ftp_password);
62.     if ($login_result == false) {
63.         $errormessage = __("Unable to login to FTP server <b>%1\$s</b> with username <b>%2\$s</b>.<br /><br />Are you sure your username and password are correct? Please contact your ISP helpdesk or system administrator for help.<br />", $net2ftp_globals["ftpserver"], $net2ftp_globals["username"]);
64.        setErrorVars(false, $errormessage, debug_backtrace(), __FILE__, __LINE__);
65.        return false;
66.    }
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,272
313
Houston
Hello @grof


Your profile indicates you're a website owner and if you don't have root access to the server I'd suggest contacting your provider to find out if this is a configuration that you're able to implement on their servers and for further assistance with it.