View Single Post
  #1   (View Single Post)  
Old 18th December 2013
vdubjunkie vdubjunkie is offline
Port Guard
 
Join Date: Feb 2009
Posts: 17
Default Web accessible PERL scripts requiring TTY

I'm developing a suite of utilities which hinge upon the ability to create SSH tunnels that will ultimately be available to end users on our intranet. I've reached the point of making the data available to the apache server on which the scripts are being developed.

The script which works until I try to have the web server run it as a CGI. At this point I get the following error.

Code:
IO::Tty::open_slave(nonfatal): open(/dev/ttyp6): Permission denied at /usr/local/libdata/perl5/site_perl/i386-openbsd/IO
/Pty.pm line 24.
Clearly the www user doesn't have rights to open TTY. I'm all about security, and I wouldn't even consider hacking away at this sort of precaution if this weren't a server which will only be accessible by another server using it to obtain the data to embed in it's own pages.

Does anybody know whether there is just a way around the www user being unable to open a TTY or whether I would actually need to run apache as another user? If so, how do I do that?
__________________
anything done in the GUI is done more efficiently in cli
Reply With Quote