• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Edit root cron using Parallel Extension

nijina

New Pleskian
I was creating an Plesk extension and I need to edit root's crontab for the extension to work properly. While doing some experiment I understand that the Plesk extension works with the permission of psaadm . So I cannot use shell_exec to do this. Is there any api or cli interface where I will be able to do this. Is there any possibility to override the restriction of psaadm user through extension.
 
Hello,

I was finally able to find a solution. The extension works perfectly with Plesk 12.0 version. I am using pm_ApiCli::callSbin to do this. But in older versions I am getting undefined method error. The exact error is pasted below.


ERROR: Call to undefined method pm_ApiCli::callSbin() (IndexController.php:17)

In the release note of Plesk I can see below statement.

==============
New APIs for developing Plesk extensions are available
===============

But it hasn't mentioned the new API. It will be really helpful if someone from Plesk can provide a right solution.
 
Last edited:
AFAIK, callSbin is indeed a new API. However, I think there's an API for creating scheduled tasks in 11.5. It should probably help you.
 
Nikolay,

Thank you for your help. However I need to do many tasks with root privilege and editing cron job is only one of them.
 
Then target Plesk 12.0 only :)

I'm not entirely sure, but scheduled tasks seem to be the only way to execute something with superuser privileges from Plesk 11.5 extension.
 
Back
Top