Mailing List Archive

WEIRD problem with MIME & images & permissions (fwd)
XBITHACK the revenge...


Forwarded message:
> From snewton@oac.hsc.uth.tmc.edu Thu Sep 7 10:54:18 1995
> Message-Id: <199509071754.KAA27566@taz.hyperreal.com>
> X-Sender: snewton@oac3.hsc.uth.tmc.edu
> X-Mailer: Windows Eudora Pro Version 2.1.2
> Mime-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"
> Date: Thu, 07 Sep 1995 12:53:59 -0500
> To: apache-bugs@apache.org
> From: "Steven E. Newton" <snewton@oac.hsc.uth.tmc.edu>
> Subject: WEIRD problem with MIME & images & permissions
>
> Hi.
>
> This is an extremely strange one, I'm sure you'll agree.
>
> I'm using Apache version 0.8.11 on HP-UX 9.03 on a 750.
>
> If an inline GIF or JPG image file has the user execute bit set, no matter
> what other permissions are set to (at least such that the server can read
> the file) then apache returns the MIME type as text/html. This seems to
> only be manifested as a problem with NCSA Mosaic for Windows 2.0final beta,
> which shows the Error! icon instead. Other browsers seem to ignore the MIME
> type returned and read the image anyway.
>
> You can try to reproduce this behavior with the URL
> http://oac3.hsc.uth.tmc.edu:8080/apstracts/1995/index.html (our older ncsa
> server is running on port 80, for comparison)
>
> I think only NCSA Mosaic for Windows will show this behavior.
>
> Please let me know if you need more info on this or my server configuration.
>
> s
>
> --
> + + + + + | snewton@oac.hsc.uth.tmc.edu
> | Nobody else speaks for me,
> They've given you a number | and I speak for no one else.
> and taken away your name. |http://oac11.hsc.uth.tmc.edu/index.html
> | + + + + + +
>
>
>
Re: WEIRD problem with MIME & images & permissions (fwd) [ In reply to ]
At 6:27 PM 9/7/95, Rob Hartill wrote:
>XBITHACK the revenge...
>
>
>Forwarded message:
(...snip...)
>> If an inline GIF or JPG image file has the user execute bit set, no matter
>> what other permissions are set to (at least such that the server can read
>> the file) then apache returns the MIME type as text/html. This seems to
>> only be manifested as a problem with NCSA Mosaic for Windows 2.0final beta,
>> which shows the Error! icon instead. Other browsers seem to ignore the MIME
>> type returned and read the image anyway.
(...snip...)

I saw this too, and did the obvious:

find /www -name "*.gif" -exec chmod -x "{}" ";"
find /www -name "*.jpg" -exec chmod -x "{}" ";"
...

Now it is "fixed"!

-ech
Re: WEIRD problem with MIME & images & permissions (fwd) [ In reply to ]
> At 6:27 PM 9/7/95, Rob Hartill wrote:
> >XBITHACK the revenge...
> >
> >
> >Forwarded message:
> (...snip...)
> >> If an inline GIF or JPG image file has the user execute bit set, no matter
> >> what other permissions are set to (at least such that the server can read
> >> the file) then apache returns the MIME type as text/html. This seems to
> >> only be manifested as a problem with NCSA Mosaic for Windows 2.0final beta,
> >> which shows the Error! icon instead. Other browsers seem to ignore the MIME
> >> type returned and read the image anyway.
> (...snip...)
>
> I saw this too, and did the obvious:
>
> find /www -name "*.gif" -exec chmod -x "{}" ";"
> find /www -name "*.jpg" -exec chmod -x "{}" ";"
> ...
>
> Now it is "fixed"!
>
> -ech


This has been a 'feature' since NCSA 1.3, note that the server is also parsing the
.gif file for SSI as well as chucking out a strange mime type. It's a case
of the documentation not being completely thorough:

"Don't set your GIFs u+x cuz strange things will happen"

It is clearly inappropriate (because I say so!) to go hacking the server
so that it doesn't parse .gif files.

In almost every case that I've received .GIF files from NFS PC's
writing to a UNIX collection area, the damn things have turned up with uog+x
perms. This is just something I live with, amicably. [.Except when all my
wonderful images come out in plaintext... ;)]

Ay.