• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Cron fails /bin/sh: /usr/local/psa/admin/sbin/fetch_url

Alex--

New Pleskian
I have added a cron in plesk to get a url

11.21.2015-17.40.png


When I hit execute now in plesk it works perfectly, however, at 09:00 nothing happens and I get the following error message in my mail:

Cron <mbino@web01> /usr/local/psa/admin/sbin/fetch_url 'http://www.xxxxx.com/crons/cron.php'
/bin/sh: /usr/local/psa/admin/sbin/fetch_url: No such file or directory.

I'm running Plesk 12.5.30 on CloudLinux Server 6.7.
 
Have you checked at least that file /usr/local/psa/admin/sbin/fetch_url is really exists on your server?
 
Have you tried to run this command with argument in command line interface? Do you have any error messages in output?
 
I have no idea what is wrong here. Maybe someone from community will help you.
Or contact Plesk Support Team.
 
A very late bump, but I ran into this same issue recently.

It seems that scheduled tasks (crons) fail if the web hosting user does not have SSH access.

I noticed this for the "Fetch a URL" type task, where I got the same error as OP: "fetch_url: No such file or directory".

I also tries to use the "Run a command" type task where I manually fetched the URL using cURL or Wget. Both also failed, apparently because cURL and Wget could not access the file containing the trusted root CAs on my system.

So my guess is that the scheduled tasks are run as the web hosting user, but when SSH access is disabled, thus user doesn't have sufficient permissions to do anything useful.

In my case, I was able to solve the problem by giving the user SSH access in the "Web Hosting Access" settings of the domain, like this:

CleanShot 2022-10-01 at 10.58.51@2x.png
 
@jnthn I have tested it on an account that does not have SSH permissions at all and was able to run the "Fetch a URL" cron job without any issues. I have also tested in on an account where SSH privileges are available, but SSH is set to "chrooted" only. No issues there either.

What the /bin/bash is doing is that it gives the hosting subscription user all access to the server. It is a high risk setting that should only be used if this subscription belongs to an admin level user. Even then I would probably not grant this permission.

The "Run a command" setting is a different issue: There you cannot access curl and wget, because they are located outside the subscription, and that is a very good thing that they are. It is a desired behavior that a user without SSH privileges cannot use curl on the command line, because with curl you can do a lot of undesirable stuff.

So for all the people who see the above post: Don't do this setting! It is very risky and allows hackers to take full control over you server.
 
Back
Top