plesk/ext-website-virus-check

scheduled task cannot be run as root

Closed this issue · 2 comments

Thanks for building this extension. I just checked it out on a testserver however, after installation each time the scheduled task is performed, it errors out with:

Task "/usr/local/psa/admin/bin/php -dauto_prepend_file=sdk.php '/usr/local/psa/admin/plib/modules/website-virus-check/scripts/virustotal-periodic-task.php'" completed with error in 0 seconds, output:

This program can not be run as root

Running the same command manually on the shell works fine though.

Hi,
is there everything is OK with other Plesk scheduled tasks?
It's looks like quite common issue, there is nothing special in scheduled task of this extension.
Maybe some security customization with SELinux, CageFS, AppArmor?

SELinux was actually one of the first things I checked and it was disabled because it was a CloudLinux machine. I tried disabling cagefs but root isn't in it and after disabling it, it still seems to fail with the same error.

Seems this issue is not related to the extension but must be something else. The other tasks for root also fail with the same error.

I checked on another server with CentOS 6 and it works fine there.