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

Hi all,

I don't know if this is the right place to ask, but I guess I just try.
I created a password-protected website and have Browser dependent problems with the permission to the scripts. Heres the situation:

1. Scenario: HTML-Page redirects to perlscript1.cgi which contains a link to perlscript2.cgi

2. With Firefox and IE for Mac, thw whole thing works perfectly, with IE (6.0....) the first script works, the second gives a "Permnission denied" error.

3. Authentication is provided by the web hosting company, I don't have anything to do with it.

Does anyone has experience with this problem? any help would be greatly apprieciated!
thanks
Ben

Replies are listed 'Best First'.
Re: Perl, Permission and Browsers
by ropey (Hermit) on Apr 21, 2005 at 09:07 UTC

    Doesnt make sense that you would get a permission denied on IE only - what HTTP error code does it get ? What permissions does your CGI's have, make sure they have the execution bit set for group

    Update

    Thanks Cog, yeah a bit not a but :)

      Firstly, thanks for your help!
      I just get the this error message:

      CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't open perl script "D:\...\cgi-bin\folder.cgi": Permission denied

      Permission itself should not be the problem, I don't wxactly know how the hosing guys are handling it but they use the ftp user for authentication, all permissions I can see are -rwxrwxrwx, so that should work.

      Another interesting thing is that if if go to perscript2.cgi and create a link to perlscript1.cgi from there, the problem arises in perlscript1 which worked perfectly the other way.

      And one more thing: a Form on perlscript1 which calls perscript3 works perfectly with all browsers.
      I'm pretty confused....
        Setting to -rwxrwxrwx is not a secure idea, do -rwxr-xr-x which will allow it to be executed not seen.. it does sound that simply put your permissions are not set correctly
        Please post the relevant sections of the two redirections. It seems strange to me that you are able to manage UNIX "-rwxrwxrwx" permissions together with files in a Win32 filesystem like "D:\...\cgi-bin\folder.cgi", so I'd rather taking a look at it.

        Flavio (perl -e "print(scalar(reverse('ti.xittelop@oivalf')))")

        Don't fool yourself.
Re: Perl, Permission and Browsers
by starbolin (Hermit) on Apr 21, 2005 at 16:53 UTC

    Check carefully this excellent link: Troubleshooting Perl CGI scripts

    Could be a header problem, an execution problem, a shell substitution problem. If all else failes you need to see the server logs. Ask your sysadmin.


    s//----->\t/;$~="JAPH";s//\r<$~~/;{s|~$~-|-~$~|||s |-$~~|$~~-|||s,<$~~,<~$~,,s,~$~>,$~~>,, $|=1,select$,,$,,$,,1e-1;print;redo}
      thanks all for your efforts!
      Flavios idea solved the problem, thanks a lot!!