Total Noob here - Cron issue

cPanel & WHM Version
v86.0.18

cerion

Member
Apr 27, 2020
12
0
1
Milford
cPanel Access Level
Website Owner
We are receiving this message:

/bin/sh: line 0: cd: /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/: No such file or directory

I have been asked to look into this but it is not my bailiwick. I'm happy to do the work if someone can clue me in on how to reset the script. I did search and found this:


As I mentioned, I am not at all familiar with any of this but I know I can accomplish it with a little guidance. Thanks in advance!
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Hello,


Is the issue that the cron is still running after fantastico was removed? You can check for cron jobs associated with the root user through the command line interface (can be accessed through WHM>>Server Configuration>>Terminal) with the command:

Code:
crontab -u root -l
You can edit the crontab with the following:

Code:
crontab -u root -e
If you see the fantastico cron present there you can just remove it which will stop it from running.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
I believe I misunderstood your access level, my apologies. If you don't have access to WHM you wouldn't be able to access the terminal for WHM. Your cPanel account may not allow this access. This makes it a bit easier though. If you go to cPanel>>Advanced>>Cron Jobs you should be able to remove that cron job from the list right from your cPanel account.
 

cerion

Member
Apr 27, 2020
12
0
1
Milford
cPanel Access Level
Website Owner
I can log into WHM as root. Is there a way to access cPanel via WHM? No one seems to know what our cPanel login would be or what email address it is tied to... Thank you for your patience.
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Hello,

Ok it looks like the easy mode is going to be out for this issue, I'm sorry. In order to remove this you'll need to log in to the server as the root user over CLI, or access terminal from WHM - but it sounded like you didn't have that available in your WHM earlier.

Once logged in the original commands I provided would allow us to see if the cron is in the root user's crontab:

To view:
Code:
crontab -u root -l
You can edit the crontab with the following:

To edit:
Code:
crontab -u root -e
If you see the fantastico cron present there you can just remove it which will stop it from running.
 

cerion

Member
Apr 27, 2020
12
0
1
Milford
cPanel Access Level
Website Owner
Ok. Now I'm feeling very ignorant. I'm assuming CLI is command line interface? I'm assuming that is the Windows command prompt. This is what I tried to get loggedin. I"m guessing I did something wrong. For what it's worth, I tried it in PowerShell as well.

1588195387136.png
1588195477931.png
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
What if you go directly to the IP address, do you still get a timed out error? Are you sure that the SSH port is 22? You can find this out by restarting the SSH service in WHM>>Restart Services>>SSH Server when it restarts you'll get some output like "server listening on <ipaddress> port 22"
 

cerion

Member
Apr 27, 2020
12
0
1
Milford
cPanel Access Level
Website Owner
Here are the results of the SSH restart:

Waiting for “sshd” to restart ………waiting for “sshd” to initialize ………finished.

Service Status
sshd (/usr/sbin/sshd -D) is running as root with PID 26018 (systemd+/proc check method).

Startup Log
May 01 14:51:46 host.allianceprinting.net systemd[1]: Starting OpenSSH server daemon...
May 01 14:51:46 host.allianceprinting.net sshd[26018]: Could not load host key: /etc/ssh/ssh_host_dsa_key
May 01 14:51:46 host.allianceprinting.net systemd[1]: Started OpenSSH server daemon.

Log Messages
May 1 10:51:46 host sshd: Could not load host key: /etc/ssh/ssh_host_dsa_key
May 1 10:51:46 host sshd[26018]: Server listening on :: port 2200.
May 1 10:51:46 host sshd[26018]: Server listening on 0.0.0.0 port 2200.
May 1 10:51:46 host sshd[26019]: Server listening on 0.0.0.0 port 56696.
May 1 10:51:46 host sshd[31346]: Received signal 15; terminating.
May 1 10:51:46 host sshd[31334]: Received signal 15; terminating.

sshd restarted successfully.

Would the port be 22 or 2200? There is also 56696. Thoughts?
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
It looks like based on that last screenshot the password is incorrect or password authentication is disabled - did it ask you for a password or just tell you access denied? What is set at WHM>>Security Center>>SSH Password Authorization Tweak?
 

cerion

Member
Apr 27, 2020
12
0
1
Milford
cPanel Access Level
Website Owner
Ok. We're getting somewhere! This is what I see when I run: crontab -u root -l It may as well be in Chinese as far as I'm concerned. Thoughts?


1588352491244.png
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Oh, you got in! I see there, it's the 10th line up from the bottom. To edit the crontab you can do:

Code:
crontab -u root -e
Just remove the associated entry (the full entry is as follows):
Code:
59 12 * * * cd /usr/local/cpanel/whostmgr/docroot/cgi/fantastico/scripts/ ; /usr/local/cpanel/3rdparty/bin/php cron.php > /dev/null 2>&1
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,309
363
Houston
Hello,

You need to do this through the crontab interface which I showed you how to do:

To edit the crontab:

Code:
crontab -u root -e
Just entering in the command as listed in the cron through the SSH interface will not make any changes