Can i run mod_perl app as normal user

Can I run mod_perl app as a normal user, similar to running a simple vanilla CGI app with suexec?

+2


source to share


2 answers


From source :

Is it possible to run mod_perl with Apache support as suExec?

Answer no. The reason is that you cannot "deny" part of the process. mod_perl lives inside the Apache process, so its UID and GID are the same as the Apache process.

You must use mod_cgi if you need this functionality.

Another solution is to use crontab to call some script that will check if there is something to do and execute it. Mod_perl script can create and update this task list.

A more subtle answer with some possible workarounds from the "Practical mod_perl" book : (I hope not pirated content, if it is, please edit it)



mod_perl 2.0 improves the situation because it allows a pool of Perl translators targeting a single virtual host. It is possible to set the UID and GID of these translators must be in the users for which the virtual host is configured, so users can work within their own protected area and cannot interfere with other users.

More solutions from sme book are in Appendix C2

+2


source


Since mod_perl runs in the apache process, I think there is usually no answer. You could, for example, start a separate apache process as this normal user and use the main apache process as a proxy for it.



0


source







All Articles