|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|
|||
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. 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 |
|
|||
abridged
In case I used too many words, I'm looking to either give the www user the ability to open TTYs or change which user runs the apache daemon. I understand the risks, and have sufficient precautions planned.
Can anybody help advise how to make one of these solutions happen?
__________________
anything done in the GUI is done more efficiently in cli |
|
|||
Probably it is of no use in your case, but there is an option called -o RequestTTY.
I am not sure if the ssh -t option could solve your issue Code:
-t Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty. A similar issue can be found at http://stackoverflow.com/questions/6...-expect-object
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
J65nko,
Thanks for the reply. I did see that post. It is the most promising thing I've found thus far. However, they are talking about selinux. I don't know if/how this would translate. At this point I'm thinking my best bet may be trying to contact the right OBSD programmer to find out if/how I can adjust the www user or apache daemon to use another user.
__________________
anything done in the GUI is done more efficiently in cli |
|
|||
If you read openpty(3) you will find that it needs /dev/pt* files. If you run the native OpenBSD Apache webserver chrooted it does not have a /dev/ hierarchy in its chroot location /var/www.
Maybe you could create a minimal demo script and post it to the OpenBSD misc mailing list and ask for advice.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
On the mailing list you were advised to use a daemon and to communicate with it using a socket.
In Perl this is not so difficult to do, the "Programming Perl" and the "Perl Cookbook" books have examples to write such daemons.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can't load any scripts in ircII | guitarscn | General software and network | 4 | 22nd November 2010 12:06 AM |
ppp scripts help | wokko | NetBSD Installation and Upgrading | 10 | 18th May 2010 05:29 AM |
Executing web scripts : can't! | erehwon | OpenBSD General | 3 | 3rd November 2009 10:02 PM |
Windows scripts can't print | drhowarddrfine | Other OS | 15 | 31st March 2009 08:53 AM |
Periodic scripts for mail scripts | stukov | FreeBSD General | 2 | 8th March 2009 07:51 PM |