blu.org  wiki

apache2 problem

View: New views
4 Messages — Rating Filter:   Alert me  

Parent Message unknown apache2 problem

by dan moylan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


i'm running ubuntu 8.10 on ibm T41, apache2, on my local
net, and getting a error message in the browser window
from my cgi script.

UTL::wopen) couldn't open
   [/home/moylan/www/cgi-bin/stuff/mbrmoy.log] for writing

permissions on the file in question are:
   --w--wx-wT 1 www-data www-data 19161 090625:1308 mbrmoy.log*

the same cgi script and supporting perl routines, running on
a remote server hosting my web site works fine -- no
problems.  the permissions on the same file are:

   --w--wx-wT 1 moylan moylan 2192 Jun 25 13:30 mbrmoy.log*

i haven't tried running this locally since i was running
red hat something or other in 2005 -- undoubtedly a mistake.

any thoughts as to what's causing the problem?

tia,
dan

j. daniel moylan
84 harvard ave
brookline, ma 02446-6202
617-232-2360 (tel)
810-454-1823 (fax)
jdm@...
www.moylan.us
[death to html bloat!]
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: apache2 problem

by Derek Martin-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Jun 25, 2009 at 08:35:49PM -0400, dan moylan wrote:
> i'm running ubuntu 8.10 on ibm T41, apache2, on my local
> net, and getting a error message in the browser window
> from my cgi script.
>
> UTL::wopen) couldn't open
>    [/home/moylan/www/cgi-bin/stuff/mbrmoy.log] for writing

What are the permissions and ownership of
/home/moylan/www/cgi-bin/stuff?  What user is the web server running
as?

My guess is the web server can not access the file, because the parent
directory's permissions (or those of the parent of the parent
directory, etc.) are too restrictive.

--
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.


_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Re: apache2 problem

by Derek Martin-9 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Jun 26, 2009 at 03:42:35PM -0500, Derek Martin wrote:
> My guess is the web server can not access the file, because the parent
> directory's permissions (or those of the parent of the parent
> directory, etc.) are too restrictive.

FWIW, the permissions of your log file are kind of odd... they're not
"wrong" per se, but they are a bit nonsensical.  I deleted the message
where you gave them, but I believe they were --w--wx-wT.  Thus you
have the execute bit set for group; this does nothing, unless the file
contains an executable script (or is a directory).  You also have the
sticky bit set, which also does nothing, at least for regular files on
Linux.  In the old days, it used to tell the operating system to keep
the executable pages of a binary in memory permanently...

If this were actually a directory (into which a series of log files
were written, for example), then it would be a different matter...
those permissions would almost make sense.   But in that case, the
directory would need to have the execute bit set for "other" so that
the web server can write files in it (the 'T' would be a small 't',
permissions mode 01233).

--
Derek D. Martin    http://www.pizzashack.org/   GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.  Replying to it will result in
undeliverable mail due to spam prevention.  Sorry for the inconvenience.


_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss

Parent Message unknown re: apache2 problem

by dan moylan-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


derek martin wrote:
> On Fri, Jun 26, 2009 at 03:42:35PM -0500, Derek Martin wrote:
> > My guess is the web server can not access the file, because the parent
> > directory's permissions (or those of the parent of the parent
> > directory, etc.) are too restrictive.

> FWIW, the permissions of your log file are kind of odd... they're not
> "wrong" per se, but they are a bit nonsensical.  I deleted the message
> where you gave them, but I believe they were --w--wx-wT.  Thus you
> have the execute bit set for group; this does nothing, unless the file
> contains an executable script (or is a directory).  You also have the
> sticky bit set, which also does nothing, at least for regular files on
> Linux.

thanks for your response.  the permissions were set by the
system in running the cgi script -- i don't understand the
reasoning.  the "non writable"  problem has been solved,
however -- the path had changed from my previous running of
the script.

now the problem seems to be that the local version sees
taint problems not seen by the remote system -- strange, but
i'll work on that before i trouble anyone.

thanks,
dan

j. daniel moylan
84 harvard ave
brookline, ma 02446-6202
617-232-2360 (tel)
810-454-1823 (fax)
jdm@...
www.moylan.us
[death to html bloat!]
_______________________________________________
Discuss mailing list
Discuss@...
http://lists.blu.org/mailman/listinfo/discuss