lscgid: execve(): Permission denied

Discussion in 'CGI/Perl/Python' started by kule, Oct 4, 2008.

  1. kule

    kule New Member

    Hi There,

    I'm trying to setup a site that uses a simple perl script:

    Code:
    #!/usr/bin/perl
    
    use LWP::Simple;
    
    print "Content-type: text/html\n\n";
    
    @content=get('http://some_url');
    
    foreach$line(@content) {
    	$line=~s/<HEAD>/<HEAD>\n<BASE target=\"_top\">\n/;
    	print $line;
    }
    
    Other perl scripts work fine however this one gives a permission denied error? Can you tell me what I've missed?

    Thanks
    Luke
  2. mistwang

    mistwang LiteSpeed Staff

    Have you chmod the script.

    Try
    sudo -u <user_lshttpd_run_as> path_to_script

    from command line.
  3. kule

    kule New Member

    Doh thats got it - thanks very much!
  4. furimedia

    furimedia New Member

    i'm also getting this, but may be different issue.

    when i try to access a html file in /cgi-bin/something.html, i get that error.

    is there any way around this?
  5. mistwang

    mistwang LiteSpeed Staff

    LiteSpeed does not allow serve any static content from a CGI directory for security reason.
    If you really need to do this, you can use "Alias" or "AliasMatch" directive to tell LSWS that those files should be served as static content.

Share This Page