[ back to toc ]

Executing binaries through PERL CGI.!?

Date: 2002/03/09 01:15

Q:
Hello. Not sure if you can help me here but I thought I would give it a
shot....
I'm currently trying to build an MP3 player interface using PERL/CGI so
that
I may get rid of the Linux terminal that I use strictly as an MP3
player--that is, I would like to use my MP3 player via my other system's
web-browser. I've been able to get my script(s) to operate the XMMS (MP3
player) binary, but, only if I execute the PERL script(s) from the system
root shell/terminal. I thought this might be due to a permissions problem
so I also tried giving XMMS a 777 permission....still not working. The
PERL
commands I've tried so far that work under the system root shell/terminal
are:

# "-f" for forward
system("xmms","-f");

# I was getting an error saying, "xmms: xmms: #cannot execute binary
file", if I
# explicitely entered 'xmms', '-f' -- so I wrote a #two line ksh script to
execute
# 'xmms -f' from a seperate shell script....????

exec {'/bin/bash'} '-sh','./shell_script_that_calls_xmms_binary.cgi';

Anyway, I'm sure my idea is possible -- I'm probably just overlooking
something.???:(

Thanks in advance for your help=),
Rob

*NAME-DELETED*@*NAME-DELETED*.net
NAU Box 09411
Flagstaff, Az 86011
(928)523-9801
A:
Unfortunately I can not help. All I can say that there should be something
else that you overlook. Because if everything is the way you write then it
works.

To debug things you can try to "su www-data" or "su nobody" depending on
your web server client context (the user the web server uses) and then
start your program from there. If it does nto work that way this is some
security issue. If it does, but not from web CGI then this is something
different.

Regards,
Peter

[ back to toc ]