简体   繁体   English

在没有mod_perl的情况下以不同用户身份运行perl脚本

[英]run perl scripts as different user without mod_perl

I'm using web-console in my project. 我在我的项目中使用网络控制台 It's a console in the browser where I can type some commands and it runs them in the server with user www-data. 它是浏览器中的控制台,我可以在其中输入一些命令,并使用用户www-data在服务器中运行它们。 The installation instructions say 安装说明说

If your web server configured to execute Perl scripts under specific user account, please make sure that this user has write permissions for recently created directory. 如果您的Web服务器配置为以特定用户帐户执行Perl脚本,请确保该用户具有最近创建目录的写权限。

is it possible to run perl scripts in the server with a user different than www-data? 是否可以用与www-data不同的用户身份在服务器中运行perl脚本? I can't see it in the apache docs. 我在apache文档中看不到它。 I'm using apache 2 with this configuration (without mod_perl): 我正在使用具有此配置的apache 2(没有mod_perl):

AddHandler cgi-script .cgi .pl
<Directory /var/www/myproject/public_html/webconsole>
        Options Indexes FollowSymLinks MultiViews +ExecCGI
        AllowOverride None
        Order allow,deny
        allow from all
</Directory>

Would this be of any help: "The suEXEC feature provides Apache users the ability to run CGI and SSI programs under user IDs different from the user ID of the calling web server. Normally, when a CGI or SSI program executes, it runs as the same user who is running the web server." 这对您有帮助吗?“ suEXEC功能使Apache用户能够以与调用Web服务器的用户ID不同的用户ID运行CGI和SSI程序。通常,当CGI或SSI程序执行时,它将以运行Web服务器的同一用户。”

Source: https://httpd.apache.org/docs/2.2/suexec.html 资料来源: https : //httpd.apache.org/docs/2.2/suexec.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM