简体   繁体   中英

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. 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.

is it possible to run perl scripts in the server with a user different than www-data? I can't see it in the apache docs. I'm using apache 2 with this configuration (without 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."

Source: https://httpd.apache.org/docs/2.2/suexec.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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