Login authentication failed creating account
Hello, I could not find someone with the same problem. So I decided to open this post.
I have the following scenario:
- The client inserts a domain into the system;
- The account is created in cPanel;
- The system copies some files from another account on the server, and via FTP pastes the files into the /public_html/ folder of the created account.
== I have the error log below, even when the script works 100%. ==
[QUOTE]Warning: ftp_login(): Login authentication failed in /home/xxxxxxxx/public_html/central/0000000/controllers/clientes-controller.php on line 10127
There was a problem while creating public_html/integracoes
Warning: ftp_put(): You aren't logged in in /home/xxxxxxxx/public_html/central/0000000/controllers/clientes-controller.php on line 10135
There was a problem while uploading /home/xxxxxxxx/public_html/central/0000000/front/index.php
Warning: ftp_put(): You aren't logged in in /home/xxxxxxxx/public_html/central/0000000/controllers/clientes-controller.php on line 10140
There was a problem while uploading /home/xxxxxxxx/public_html/central/0000000/front/.htaccess
Warning: ftp_put(): You aren't logged in in /home/xxxxxxxx/public_html/central/0000000/controllers/clientes-controller.php on line 10145
There was a problem while uploading /home/xxxxxxxx/public_html/central/0000000/front/integracoes/.htaccess
== This is the line that makes the connection: == [QUOTE]$login_result = ftp_login($conn_id, $user, $senha);
I have already done several procedures on the server, based on similar problems and could not resolve. Can anyone help?
== This is the line that makes the connection: == [QUOTE]$login_result = ftp_login($conn_id, $user, $senha);
I have already done several procedures on the server, based on similar problems and could not resolve. Can anyone help?
-
- The system copies some files from another account on the server, and via FTP pastes the files into the /public_html/ folder of the created account.
This sort of thing, copying files to a newly created account, is done using the skeleton directory in the Resellers, or root's cpanel3-skeldirectory. You can read more about that, here: Skeleton Directory - Version 74 Documentation - cPanel Documentation I would think that your script does not have permissions to write to another accounts directory structure.0 -
I can't answer that. I can only tell you that you probably shouldn't need a script to do something that's already built into cPanel. 0 -
I can't answer that. I can only tell you that you probably shouldn't need a script to do something that's already built into cPanel.
Hi, I use this function mentioned by you in another dedicated where all clients use the same type of platform and works well. But in the situation I'm facing with the script, it's different! Not all will receive the files that the script should copy to the / public_html / folder. Understood? I use this script in another dedicated one and it works perfectly, running 100% without any errors. Strange, I get an error log even when the script works.0 -
I'm unable to assist you with your custom script, my apologies. 0 -
- The system copies some files from another account on the server, and via FTP pastes the files into the /public_html/ folder of the created account.
Hello @Ricardo Lobo, Can you share any error messages output to /var/log/messages at the date/time the account is created? Thank you.0 -
Hello @Ricardo Lobo, Can you share any error messages output to /var/log/messages at the date/time the account is created? Thank you.
Hi, I have the following log: [QUOTE]Jun 5 11:26:57 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] New connection from 111.11.11.11 Jun 5 11:27:03 host54-73 pure-ftpd: (?@111.11.11.11) [WARNING] Authentication failed for user [xxxxxxxx] Jun 5 11:27:03 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] Logout.
If I repeat the same function 2 times, it works: [QUOTE]Jun 5 11:26:57 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] New connection from 111.11.11.113 Jun 5 11:27:03 host54-73 pure-ftpd: (?@111.11.11.11) [WARNING] Authentication failed for user [xxxxxxxx] Jun 5 11:27:03 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] Logout. Jun 5 11:27:38 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] New connection from 111.11.11.11 Jun 5 11:27:38 host54-73 pure-ftpd: (?@111.11.11.11) [INFO] xxxxxxxx is now logged in Jun 5 11:27:38 host54-73 pure-ftpd: (xxxxxxxx@111.11.11.11) [NOTICE] /home/xxxxxxxx//public_html/index.php uploaded (28533 bytes, 31527.16KB/sec) Jun 5 11:27:38 host54-73 pure-ftpd: (xxxxxxxx@111.11.11.11) [NOTICE] /home/xxxxxxxx//public_html/.htaccess uploaded (2527 bytes, 12922.09KB/sec) Jun 5 11:27:38 host54-73 pure-ftpd: (xxxxxxxx@111.11.11.11) [NOTICE] /home/xxxxxxxx//public_html/integracoes/.htaccess uploaded (17 bytes, 115.28KB/sec) Jun 5 11:27:38 host54-73 pure-ftpd: (xxxxxxxx@111.11.11.11) [INFO] Logout.0 -
Hi Actually cphulk is disabled. 0 -
Hi, Your Support Request ID is: 12501435 Sincerely Ricardo Lobo 0 -
Hello, To update, here's a summary of the response sent by one of our Technical Analysts: [QUOTE] If you would like these files to be put in every new account, we would recommend using the cPanel skeleton directories as any files here will automatically be placed into newly created accounts. We have some great information on that here: Skeleton Directory - Version 80 Documentation - cPanel Documentation Alternatively, an FTP connection wouldn't be necessary for a transfer of files in the same server. Other tools such as the 'cp' (cp(1) - Linux manual page) or 'rsync' (rsync(1) - Linux man page) are better suited to this task, and I would recommend considering updating your script to use one of these methods instead as they would not require the server to make a connection to itself.
Thank you.0
Please sign in to leave a comment.
Comments
13 comments