kpaxian25 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: invoke shell script
by blue_cowdawg (Monsignor) on Feb 23, 2006 at 16:52 UTC
        and then connects to another server using Net::SSH::Perl run a command in remote server using the parameter i recived via the html page

    Holy security hole Batman! I hope at the very least you are logging what is being executed!

    First off, whenever I read that something works from the command line and doesn't from a CGI script my first thought is "check the logs, Luke! check the logs!"

    What do you see in the logs for errors?


    Peter L. Berghold -- Unix Professional
    Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
      I ++ed you as a bonus nerd point for includng references to both Batman and Star Wars in your reply. Well done. :D
Re: invoke shell script
by ptum (Priest) on Feb 23, 2006 at 17:32 UTC

    Whenever I hear that something works from the command line but doesn't work from the browser, I think, "Permissions". People tend to forget that when they are executing a CGI script from the browser, the script runs under the permissions of whatever userid is set up in the web server (often 'nobody' or 'webuser'). So (say, for example, when connecting via SSH) it is quite a different thing for [id://kpaxian25] to attempt an SSH connection to a remote machine than it is for 'webuser' (or whoever) to attempt the same SSH connection. It is possible that there are some keys that need to be applied to webuser's .ssh directory to permit passwordless SSH authentication.


    No good deed goes unpunished. -- (attributed to) Oscar Wilde
          Whenever I hear that something works from the command line but doesn't work from the browser, I think, "Permissions".

      Hence why I said "check the logs." If it is permissions or trust relationshipo issues or whatever it will (should) show up in the error and/or access logs.


      Peter L. Berghold -- Unix Professional
      Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg