script run as apache from web page fails.

Discussion in 'Apache' started by prekursor, Sep 16, 2010.

  1. #1
    I have created a php site that allows a user to execute a perl script.
    When I run a script as apache user from command line, it works fine but when I run it from the web page, the script runs and it dies saying: problem connecting to "switch1", port 23: Permission denied at /var/www/html/scripts/getHost.pl line 40

    line 40 contains $session = Net::Telnet::Cisco->new(Host => "$switch");

    this is where I use a Net::Telnet::Cisco module to telnet to a device.

    I am running CentOS
     
    prekursor, Sep 16, 2010 IP