Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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 ( #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.
  • Comment on Re: How Would I access a C++ compiler remotely through a Perl CGI Script?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2020-03-30 20:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    To "Disagree to disagree" means to:









    Results (176 votes). Check out past polls.

    Notices?