• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • 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.

Issue Cron: ERROR: [Errno 20] Not a directory: '/usr/sbin/nologin'

TorbHo

Basic Pleskian
Ubuntu 16.04.6 LTS‬
Plesk Obsidian, Version 18.0.24

Hello,

when I start a specific cron job via Plesk, I get the following error:

ERROR: [Errno 20] Not a directory: '/usr/sbin/nologin'

The cron runs under the user www-data and should just load a web-url with a php script.

Thank you for your help!
 
What type of command is executed? It looks as if you are trying to run a shell command, but there is no shell access configured in the webspace subscription.
 
The cron just runs a php script via https:// url.
If I run the script from another server it works, but the same server where the script is located gives the error message.
 
Is this really configured as "Run as PHP"? It seems it is not but rather you are trying to execute PHP through the shell. If it was configured as "Run as PHP" then you would not need to enter a URL.
 
Now I tried to run script as PHP script via cron-style
Code:
* * * * * /usr/bin/php -f /var/www/vhosts/html/script.php  &> /dev/null
Same error.
 
If the script is located on a server on the Internet and you normally would only want to open it through a GET, that process normally cannot deliver the error result you are seeing.

Could you please test the same setting with something else, for example simply downloading any other website (URL)?
 
Back
Top