• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Can't modify cron, change admin pass or use watchdog

HelH

New Pleskian
Hi,
I have a fresh install of Plesk on a new server but I can't set up or modify any cron jobs, change the admin password or use watchdog. I need to migrate from the old server but need the cron working first but I'm at a complete loss.

CentOS 5 64bit + Plesk Panel 10.2
PHP 5.2.10

If you click on the Watchdog module it gives:

ERROR: WDCPExc
Changing of crontab configuration failed.
0: wdcplib.php:137
set_cronjob_task(string '/usr/local/psa/libexec/modules/watchdog/cp/secur-check', string 'root', array)
1: wdcplib.php:33
set_secur_scan_cronjob(string 'weekly')
2: configure.php:20
require_once(string '/var/psa/admin/plib/modules/watchdog/configure.php')
3: wdcplib.php:212
wd__require_once(string 'configure.php')
4: preaction.php:17
require_once(string '/var/psa/admin/plib/modules/watchdog/preaction.php')
5: index.php:3


If you try to set up or modify any cron:

ERROR: PleskFatalException
Crontab->export() failed: plesk_tempnam() failed: tempnam failed:Incorrect temporary file name generated.

0: CrontabPropertiesUIPointer.php:57
CrontabPropertiesUIPointer->accessItem(string 'POST', NULL null)
1: UIPointer.php:595
UIPointer->access(string 'POST')
2: plesk.php:42

If you try to change the admin password:

ERROR: PleskFatalException
plesk_tempnam() failed: tempnam failed:Incorrect temporary file name generated.

0: cmd_server.php3:55
ch_admin_pass(string '************************', string '************')
1: admin-password.php:54
plesk__admin_password->accessItem(string 'POST', NULL null)
2: UIPointer.php:595
UIPointer->access(string 'POST')
3: plesk.php:42
 
Try to find reason in /usr/local/psa/admin/logs/panel.log
Most probably that problem was caused by a misconfiguration in root crontab and watchbog couldn't overwrite it.
 
Hi,
I've managed to sort those out now, the tmp folders were in the wrong place.
But I still have this when trying to set up a cron on a domain. The system user has "access to the server over SSH" set to /bin/bash:

ERROR: PleskFatalException
No secure shell available

0: SysUser.php:1473
SysUser->_getSecureShell()
1: SysUser.php:1452
SysUser->getCrontabShell()
2: client.domain.hosting.crontab.php:32
plesk__client__domain__hosting__crontab->_getShell()
3: client.domain.hosting.crontab.php:26
plesk__client__domain__hosting__crontab->getCrontab()
4: CrontabTaskUIPointer.php:65
CrontabTaskUIPointer->accessItem(string 'GET', NULL null)
5: UIPointer.php:595
UIPointer->access(string 'GET')
6: plesk.php:42
 
Hi
I did and also followed the instruction in the manual -
If you trust your customers enough to allow execution of scripts in a non-chrooted
environment, then you can select the required shell by issuing the following command
in the console:
# /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell
?/bin/sh?
But it gave me:
[ *** ~]# /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell"/bin/sh"
-bash: /usr/local/psa/admin/bin/server_pref: No such file or directory
:(
 
You should use:

# /usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh
 
We are seeing this issue in Plesk 10.4.4 Update #36 - we run the command below and the 'No secure shell available' message goes away:

Code:
/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh

But after some time, the 'No secure shell available' message comes back and the only way to fix it is to again run the command above.

Does anyone have any suggestions what is causing this and how to fix it?

Thanks,
Chris
 
We are on Plesk 10.4.4 Update #43 and have the same issue with having to run the command every couple of weeks.

Has anyone found a way to resolve it? Is it fixed in version 11?
 
As far as i'm aware, there has been no fix for this issue as we are running the latest update of 10.4.4. The way we work around this is to run the server_pref command hourly via a cron job - not ideal but has prevented any ongoing customer issues.

I haven't tested 11 to confirm if the issue still exists, though we certainly wouldn't use 11 in a production environment at this time - not least because we've only just moved to 10.
 
The problem still exists with the latest Plesk 11. Everytime a user creates or change a crontab the crontab shell has no shell an an entry like "curl http://do.com/it.php' ended up with a '-: curl: command not found'.

Setting up a cronjob with '/usr/local/psa/bin/server_pref -u -crontab-secure-shell /bin/sh' helps as a workaround, but it's not really a solutions.

Any news on this?


Thx,
Christian
 
Back
Top