Problem with Scratch Directory

Garance A Drosehn gad at eclipse.its.rpi.edu
Fri Feb 24 20:34:28 PST 1995


Doug Foxgrover writes:
> When one student logs on and starts OmniWeb, as soon as they get
> their first image, a new scratch directory gets created,
> /tmp/OmniWeb.  This directory has the ownership and permissions
> of this particular student, and everything works fine.
>
> When a new student logs into this machine and starts OmniWeb,
> the new student cannot use the default scratch directory, because
> it is not world writable.  Therefore, the new student cannot view
> images or otherwise use the scratch directory.
>
> Can you please return to using /tmp as the scratch directory?  Or
> have the directory /tmp/OmniWeb deleted when the app quits?

I think it's a good idea to have a subdirectory for the Omniweb
stuff, instead of spraying files all over /tmp.  Deleting that
directory when the app quits is a good idea, but it's best to also
guard against situations where the app does not quit cleanly.

One easy solution is for OmniWeb be a bit more inventive when naming
the directory.  At the very least, name it:
     /tmp/OmniWeb-`who am i`
(so to speak), although I think it'd be even better to tack on a suffix
that's the process number of the running OmniWeb.  This allows the user
to run more than one copy of OmniWeb at a time (for whatever reason they
might want to do that -- don't ask me why...), without the two copies
tripping over each other.

Another solution is for OmniWeb to make it world-writable, but that
might be unwise if the machine allows people to telnet into it (as
my NeXTstation does...).

> ..., and I'm not sure what the benefit is in having an OmniWeb
> subdirectory of /tmp.

An advantage might be that it's trivial to find and remove all
temporary files that OmniWeb created.  You also don't run the risk
of some file that just happens to be in /tmp (from something else,
totally unrelated to OmniWeb) being used for a file that OmniWeb
*should* be downloading from the remote site.

I think it's a good idea on general principles, although one does
have to watch out for the problems you've noticed.

---
Garance Alistair Drosehn     =     gad at eclipse.its.rpi.edu
ITS Systems Programmer            (handles NeXT-type mail)
Rensselaer Polytechnic Institute;           Troy NY    USA


More information about the OmniWeb-l mailing list