Why did cPanel plugin always inherit the cgroup of cpsrvd?
Hello,
I am in the process of developing cPanel plugin by using php that run something using exec function. I found out that the process run and the spawned process always inherit the cgroup of cpsrvd. As i use cagefs and lve from CloudLinux too, i think this is not good. How can i set every exec that run in cPanel plugin to inherit the respective cgroup of the lve user ?
The process that inherit the cpsrvd cgroup will end up having cagefs escaping.
Regards,
Nizar Akbar Meilani
-
Hey there! The plugin will always have the cgroup of cpsrvd as that is the parent process. The best option would likely be to use cpsrvd's PHP-FPM, as that would hand off the process to the FPM socket, and then the FPM pool itself runs as the cPanel user and not cpsrvd.
Would that work for you?
0 -
Hello,
Is there any documentation how to set the cPanel plugin so it is run by cpsrvd PHP-FPM not by /usr/local/cpanel/3rdparty/php/83/bin/php-cgi ?
The temporary current solution that i found recently by using bash wrapper script that run cagefs_enter.proxied then use the script in exec appended by the command.
0 -
You can enable this in WHM >> Service Manager by enabling the " PHP-FPM service for cPanel Daemons" option there. Can you try that?
0 -
Is there any detailed documentation? it is still not using fpm even when php-fpm service for cPanel already activated.
0 -
That's odd as that is one of those things where "it should just work" after it has been enabled without additional configurations.
Could you create a ticket so we can check this on your machine?
0 -
Did we need to activate PHP-FPM on MultiPHP Manager too?
0 -
No, that wouldn't be necessary as this would be for internal cPanel processes and not public PHP used on websites.
0
Please sign in to leave a comment.
Comments
7 comments