Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   Perl/CGI - suEXEC (http://www.go4expert.com/forums/perl-cgi-suexec-t9663/)

iraklic 31Mar2008 16:43

Perl/CGI - suEXEC
 
Hi everyone,

this is my first post. I relly hope you guys can help me.

So here is the thing:

I am trying to write to file from web using cgi. The user for web is '' (nobody) and of course it has no priviladges to open file for writing. So now I wanna do that with suEXEC.

1. Could you tell me how?
2. I couldn't find $q->virtualhos() or something like that for my query...


Thanks in advance...

pradeep 31Mar2008 17:33

Re: Perl/CGI - suEXEC
 
I guess your webserver is Apache, try this http://httpd.apache.org/docs/1.3/suexec.html

iraklic 31Mar2008 17:37

Re: Perl/CGI - suEXEC
 
yes, it's apache.
been there... read that... didn't really help... may be I'm slow...

can you actually give me a quick short code for perl that does something using that? I'd appreciate that.

and... thanks for reply...

pradeep 1Apr2008 10:46

Re: Perl/CGI - suEXEC
 
You'll need to configure SuExec on Apache to run Perl scripts as owner!

iraklic 1Apr2008 12:35

Re: Perl/CGI - suEXEC
 
Let's say suECEX is installed and configured on Apache. So I am writing a script where I have to change user from default to mine and give it some priviladges, is that right? If yes then how do I do that? That is my question. Thanks.

pradeep 5Apr2008 16:12

Re: Perl/CGI - suEXEC
 
You'll need to compile apache back from source with suexec support! What OS are you using?

iraklic 5Apr2008 17:04

Re: Perl/CGI - suEXEC
 
I'm using linux. What do you mean compile apache back from sourse?

can you just show me a little exaple of cgi using suEXEC?

pradeep 6Apr2008 11:01

Re: Perl/CGI - suEXEC
 
Here, this is a full tutorial of how to use suexec http://linuxplanet.com/linuxplanet/tutorials/1445/1/

iraklic 6Apr2008 13:49

Re: Perl/CGI - suEXEC
 
Thanks it helps.
Last thing. So as I understand you have to configure suEXEC with it's users on apache side and is hase nothing to do with perl script itself (It just gains the user priviladges given by suEXEC).
Is this correct?

pradeep 7Apr2008 11:31

Re: Perl/CGI - suEXEC
 
Yes right! Perl script remains the same, usually the perl script is executed by the user assigned to the web server, but by using suexec, the perl script is executed using the permissions of the user who owns it!


All times are GMT +5.5. The time now is 17:58.