Perl, Web front end, access rights - Help a newbie?

Madison Kelly linux-5ZoueyuiTZhBDgjK7y7TUQ at public.gmane.org
Tue Apr 27 15:12:47 UTC 2004


Thanks for the reply, Fraser!

   I was afraid that I CUPS did that, shoot. Other then setting Apache 
to run as root is there no other way to have a perl script run apps as 
root (given that the user has the right root password)? I am not very 
familiar with sudo so going that route would mean I have to learn yet 
more. In the end that may be best (and something I should do before 
finishing, anyway).

   I am also hoping at this point to keep things as simple as possible 
so that when I run into problems it is easier to find them. If I have to 
use sudo then I guess it'll be time to search for a good how-to... 
Thanks again!

Madison


Fraser Campbell wrote:
> On Tuesday 27 April 2004 09:55, Madison Kelly wrote:
> 
> 
>>   My question is: How can I get 'root' access to the server via a CGI
>>script? I am pretty sure that it can be does because CUPS seems to do it
>>(I have to enter the 'root' username and password before I can manage
>>printers).
> 
> 
> cups runs as root and has a built in webserver, apache generally does not run 
> as root.  You could run apache as root but it's not recommended.
> 
> 
>>   I have already written the first part where I use two lists, one for
>>valid source partitions (which can only be read from) and one for valid
>>destination partitions (which can be accessed read/write) and any other
>>partition will be ignored. The script verifies that at least one valid
>>source and one valid destinatiton exists before continuing. Now I want
>>to start the webifying but I need your help (pretty please?)!
> 
> 
> One approach is using sudo to call command line scripts with appropriate 
> paramaters (and parameter checking).
> 
> You could also have a root cronjob (or even a continually running process) 
> that keeps an eye out for new jobs ... the cgi script can store those jobs in 
> a database, a file, it could communicate with your other process, etc.
> 


--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list