我可以以普通用户身份运行 mod_perl 应用程序吗

发布于 2024-08-28 03:41:56 字数 61 浏览 3 评论 0原文

我能否以普通用户身份运行 mod_perl 应用程序,类似于在 suexec 下运行普通 CGI 应用程序?

Can I run my mod_perl aplication as an ordinary user similar to running a plain vanilla CGI application under suexec?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

云醉月微眠 2024-09-04 03:41:56

来自来源

是否可以将启用 mod_perl 的 Apache 作为 suExec 运行?

答案是否定的,原因是
你不能“suid”进程的一部分。
mod_perl 存在于 Apache 内部
进程,所以它的 UID 和 GID 是
与Apache进程相同。

如果需要,你必须使用mod_cgi
此功能。

另一个解决方案是使用 crontab
调用一些脚本来检查
是否有事可做以及
将执行它。 mod_perl 脚本
将能够创建和更新这个
待办事项列表。

更细致的答案以及一些可能的解决方法来自 《实用mod_perl》一书
(希望不是盗版内容,如有请删掉)

mod_perl 2.0 改善了这种情况,
因为它允许 Perl 池
口译员致力于
单个虚拟主机。有可能
设置这些的 UID 和 GID
解释者是用户的解释者
虚拟主机是
配置完成后,用户就可以进行操作了
在自己的受保护空间内
无法干扰其他人
用户。

中小企业书中的其他解决方案位于 附录 C2

From the source:

Is it possible to run mod_perl enabled Apache as suExec?

The answer is No. The reason is that
you can't "suid" a part of a process.
mod_perl lives inside the Apache
process, so its UID and GID are the
same as the Apache process.

You have to use mod_cgi if you need
this functionality.

Another solution is to use a crontab
to call some script that will check
whether there is something to do and
will execute it. The mod_perl script
will be able to create and update this
todo list.

A more nuanced answer with some possible workarounds from "Practical mod_perl" book:
(I hope that's not a pirated content, if it is please edit it out)

mod_perl 2.0 improves the situation,
since it allows a pool of Perl
interpreters to be dedicated to a
single virtual host. It is possible to
set the UIDs and GIDs of these
interpreters to be those of the user
for which the virtual host is
configured, so users can operate
within their own protected spaces and
are unable to interfere with other
users.

Additional solutions from the sme book are in appendix C2

飘落散花 2024-09-04 03:41:56

由于 mod_perl 运行在 apache 进程中,我认为答案通常是否定的。例如,您可以作为普通用户运行一个单独的 apache 进程,并使用主 apache 进程作为它的代理。

As mod_perl runs within the apache process, I would think the answer is generally no. You could, for example, run a separate apache process as this ordinary user and use the main apache process as a proxy for it.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文