in reply to Perl, Permission and Browsers

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 :)

Replies are listed 'Best First'.
Re^2: Perl, Permission and Browsers
by Anonymous Monk on Apr 21, 2005 at 09:25 UTC
    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
        Thats not quite right. If I remember correctly, to make something executable, but not viewable, you would want the permissions as

        -rwxr-x--x

        That would set the Read/Write/Execute bits on the file for the Owner, the Read/Execute bits for Group (but not Write) and Execute (no Read or Write) for World (i.e. everyone else). But, those are Unix-style permissions, not Windows. You might see the following

        -rwxrwxrwx
        permissions if you are looking at the file on a Windows machine with FTP (depending on how permissions are set for files on the Windows machine).
      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.
        well, quite frankly this -rwxrwxrwx does not seem to have any impact, I only got that from my ftp-program, I'm aware that the server is on Win NT, but I only have ftp access to it.
        the first redirection is in intern.htm, the file contains only
        <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.lent.ch/intern/cgi-bin/main.cgi">


        the second one is in main.cgi and looks like this:
        <td> <a href='/../intern/cgi-bin/folder.cgi?intern/$file'> $file </a></td>
        so its just a simple html-link, but these don't work with IE. However, if I create a link to a regular html-file (inside the protected folder), this works fine.
        well, quite frankly this -rwxrwxrwx does not seem to have any impact, I only got that from my ftp-program, I'm aware that the server is on Win NT, but I only have ftp access to it.
        the first redirection is in intern.htm, the file contains only
        <META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.lent.ch/intern/cgi-bin/main.cgi"></META +>


        the second one is in main.cgi and looks like this:<br> <td> <a href='/../intern/cgi-bin/folder.cgi?intern/$file'> $file </a>< +/td>

        so its just a simple html-link, but these don't work with IE. However, if I create a link to a regular html-file (inside the protected folder), this works fine.