httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Moran <>
Subject Re: [users@httpd] Error and not sure why or how to fix
Date Tue, 02 Sep 2003 20:39:24 GMT
M.D. DeWar wrote:
> Hello,
> Thanks. I had read that but guess I don't quite understand this part:
> "Also, if your program reads from, or writes to, any other files, those
> files will need to have the correct permissions to permit this."
> What permiisions would the maillogs need ???

With a default install of FreeBSD and Apache, a www user and group will be
created.  If you could send us a copy of the CGI, it would be easier to
understand exactly what's going on, however ...

> they are owned by root.wheel and 640 so I don't quite understand yet how to
> determine who and what they should be.

If your CGI is trying to write to those files, it's not going to be able to,
as www:www has no permissions whatsoever to that file.

However, if your CGI is trying to write directly to that file, it's probably
poorly written.  You shouldn't have to alter those permissions.

My opinion would be to alter the CGI to either use syslog, or create its
own log file.

As a fallback, you could change the permissions on the maillogs to 660, and
set the owner to root:www ... that would give processes run under Apache
the rights you seem to think you need.  I don't think this is a good way to
fix the problem, tho.  At best, it would be one way to see if that file is
really the one causing the problem, so you could fix it correctly.

> Thanks
> mark
> ----- Original Message ----- 
> From: "Boyle Owen" <>
> To: <>
> Sent: Tuesday, September 02, 2003 10:36 AM
> Subject: RE: [users@httpd] Error and not sure why or how to fix
> A quick guess would be that the apache user (see "user" directive) does
> not have permission to execute the CGI program or to write to files that
> it creates (it looks like a mail-sending CGI?).
> Remember that apache spawns a shell with a its own userid to execute
> CGIs - they don't run in the account of the program owner or root or
> anything like that... See
> for details.
> Rgds,
> Owen Boyle
> Disclaimer: Any disclaimer attached to this message may be ignored.
>>-----Original Message-----
>>From: M.D. DeWar []
>>Sent: Dienstag, 2. September 2003 15:47
>>Subject: [users@httpd] Error and not sure why or how to fix
>>I have been reading all I can and I can't seem to find out why
>>or who is
>>causing this error. I am not a unix/apache or any software
>>guru. I perfer
>>hardware. it can be thrown and stomped on and sent back.
>>I am running on freebsd 4.8. When I installed the system I has
>>the packages
>>for Apache,PHP and other programs installed. I will not do
>>that again. I
>>have no clue were what went and what options. For a newbie is
>>not a good
>>thing to do I think.
>>I am tyring to run a cgi script. When run from the command
>>line it works but
>>from the web i get no data returned. The error is this in the
>>[Tue Sep 02 09:35:45 2003] [error] [client] zcat:
>>.0.gz: Permission denied, referer:
>>[Tue Sep 02 09:35:45 2003] [error] [client] cat:
>>Permission denied, referer:
>>I had another machine and it ran fine but that was apache 1.3.
>>This is apache, :
>>spamcop# httpd -v
>>Server version: Apache/2.0.44
>>Server built:   Mar 22 2003 19:14:22
>>I have looked at permissions and they seem okay but again I am
>>not 100%.
>>Any help is greatly appreciated or pointers.

Bill Moran
Potential Technologies

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message