in reply to cgi-bin server error

I have full permissions on this file and on the directory

Depending on the configuration of the webserver your script may be executed with the rights of the webserver, not yours.

--
trust in bash
but tie your camel

Replies are listed 'Best First'.
Re: Re: cgi-bin server error
by oaklander (Acolyte) on Feb 13, 2002 at 17:35 UTC
    So I need to advise the server admin to give me what permissions?? I can make my scripts work if I just use a form and script (.pl) but if I get a text file involved I get the permissions error.
      As rjray mentioned, the webserver usually runs as user nobody, so all the cgi-script run as if they were executed by this user. If you need to open a file within a cgi-script, the file has to be readable by nobody.

      You should also consider that files created by the cgi-script are owned by nobody with the permissions depending on his umask.

      Note that these are some default configuration options. It's possible that the cgi-scripts are executed with the permissions and rights of the script-owner. Ask your admin about the webserver configuration and try to find a secure solution for your problem. The easiest way would be to change the file permissions to world-readable (chmod 666 <file>) which means that everyone may read the file who has access to the server - not a secure solution for sensible data ...

      --
      trust in bash
      but tie your camel