Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: How Would I access a C++ compiler remotely through a Perl CGI Script?

by schweini (Friar)
on Oct 21, 2005 at 20:52 UTC ( [id://502124]=note: print w/replies, xml ) Need Help??


in reply to How Would I access a C++ compiler remotely through a Perl CGI Script?

Well, since you don't seem to want to do this over SSH/scp/FTP, let me just point out that it is very easy to do this. Just store the received form data in some file, compile, redirect STDERR and STDIN to some other file or program, and return that to the browser.
Whether your apache is authorized to access any files gcc might need depends on your system, but usually apache is configured to have as few privileges as possible, so you might want your CGI script to call some other, non-CGI script via 'sudo'. That way, you can easily and securely define just exactly what permissions you want to give the script that's going to compile your script, without altering apache's config or access-privileges. Just make sure to include "NOPASSWD" in your sudoers file, and put your CGI script in some password-protected zone (using .htaccess, for example), because letting strangers compile stuff on your machine doesn't sound as a goog idea.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://502124]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-03-29 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found