• 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!
  • 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.

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