[squid-users] Re: Why squid -z

From: RW <fbsd06@dont-contact.us>
Date: Thu, 28 Feb 2008 22:36:39 +0000

On Tue, 26 Feb 2008 12:25:06 +0200
Angela Williams <angie@eoh.co.za> wrote:

> On Tuesday 26 February 2008, Ric wrote:
> > I'm wondering why we require "squid -z" before starting up Squid for
> > the first time. Is there some reason why Squid shouldn't do this
> > automatically when necessary?
>
> Just a simple scenario?
> I use a separate cache file system for all my many squid boxes.
> Now for some reason one of the boxes get bounced and my squid cache
> filesystem fails to mount but squid comes up happily and say Oh look
> I don't have any cache directory structure so let me make one! Root
> filesystem is limited in space and then this dirty great big
> directory structure is created and then gets used by squid. In the
> twinkling of an eye the root filesystem is full!

I don't think this could actually happen unless the admin does
something perverse.

If squid is run under it's own user, it would own the mounted
filesystem, but the mountpoint should still belong to root, operator or
whatever. The squid daemon wouldn't be able to write the cache
directories under the mountpoint unless the admin had explicitly given
it write permission or changed the ownership of the mountpoint to
the squid user (even though squid doesn't do the mounting).

OTOH when you run squid as root (which you probably shouldn't do
anyway) the cache directory needs to be owned by
"cache_effective_user" for squid to use it.
Received on Thu Feb 28 2008 - 15:37:04 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:06 MST