• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • We are looking for U.S.-based freelancer or agency working with SEO or WordPress for a quick 30-min interviews to gather feedback on XOVI, a successful German SEO tool we’re looking to launch in the U.S.
    If you qualify and participate, you’ll receive a $30 Amazon gift card as a thank-you. Please apply here. Thanks for helping shape a better SEO product for agencies!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

php: command not found

C

cmer

Guest
Hello,

I just migeret my site on a server plesk 10.2.0 CentOS on the server there is a user who needs to perform tasks crontab php php -q /var/www/vhosts/blablabla.php but the stain crontab does not work and returns as an error

-: php: command not found

Is there a solution??
 
That command is broken if you give the user chrootsh for the shell; they either need full shell access to run cron jobs, or they need forbidden for that setting to take effect and let them run cron jobs.
 
I'm running Plesk 10.4.4 and when I tried the command as specified in the Administrator Guide:

/usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell "/bin/sh"

I got the following output:

/usr/local/psa/admin/bin/server_pref: No such file or directory

I then tried this command:

/opt/psa/bin/server_pref -u -crontab-secure-shell "/bin/sh"

and got this output:

SUCCESS: Server preferences are successfully updated

Is this a safe fix?
 
Is this a safe fix?

Currently, that command will only work if the customer is set to have a forbidden shell (and unnecessary if you give them a full shell). If you give your customers chroot bash for their shell, they will not be able to run cron jobs no matter what you do.
 
Yep solution is in the documentation: http://download1.parallels.com/Plesk/PP10/10.2.0/Doc/en-US/pdf/plesk-10-administrator-guide.pdf
(Page 166 about crontab-secure-shell)

Hello Team,

I am also facing the same issue on my shared server.
-: php: command not found

I tried a lot to run cron script, but getting failure each time.

Manual says that, we have to run provided command to enable SSH. and then after the cron script can works.

So my question is that, where to execute command:
# /usr/local/psa/admin/bin/server_pref -u -crontab-secure-shell /bin/sh

Please help me to fix it ASAP.
 
Last edited:
Hello Team,

I am also facing the same issue on my shared server.


I tried a lot to run cron script, but getting failure each time.

Manual says that, we have to run provided command to enable SSH. and then after the cron script can works.

So my question is that, where to execute command:


Please help me to fix it ASAP.

The command that was given includes the full path; you'd run it as root while logged into the server via SSH.

Keep in mind that it has the limitations I pointed out previously; it is only going to be useful if your customers are set to have a shell of 'Forbidden' and is completely useless if they have a shell of /bin/bash. If you attempt to use it with the more secure option of "/bin/bash (chrooted)" then it will not work and your customers also won't be able to use SSH; i.e. the most secure setting to give your customers breaks their cron jobs.
 
Back
Top