|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
Is there a way to write a Perl script that would run as a different user?? To be more specific, I want to write a Perl CGI program that would change user as soon as it is executed. Of course, the user executing the program would be the user Apache runs under (nobody or www).
So, again, is there a way to do this, or will I have to write a small C program to do this?? (Please tell me no... ) |
|
#2
|
|||
|
|||
|
This is actually an Apache question. It doesn't matter whether it's Perl or PHP or any others, you just can't change the user Apache runs as within your script.
That's why you need SuEXEC or Cgiwrap to accomplish your task. Another way is to recompile Apache and add -DBIG_SECURITY_HOLE to the EXTRA_CFLAGS line or your src/Configuration file. That is, your Apache is capable to run as root. Be warned, you need to know what you are doing when running Apache as root. |
|
#3
|
|||
|
|||
|
So there is only that way?? OK, then, SuEXEC is the way, since running Apache as root is not something to be toyed with.
Another question, as a follow-up: any good tutorials or documents on SuEXEC and how to use it?? |
|
#4
|
|||
|
|||
|
1) http://www.apache.org/docs/suexec.html
2) http://apachetoday.com/news_story.php3?ltsn=2000-07-12-001-01-NW-LF-SW 3) http://www.apacheweek.com/issues/search.cgi?suexec [This message has been edited by freebsd (edited October 24, 2000).] |
|
#5
|
|||
|
|||
|
Thanks a lot. Will read these docs and see what I came uo with...
Thanks again. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Perl and suid |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|