# Squid - Initializing The Cache



## bkaron (Dec 6, 2004)

Some of you that have been following my post about "http Tunnel" may know about my "UNIX Friend" (Andy) and he helped me configure many programs, including Open VPN. Now andy a a freaking genius and smart as hell, but he is not the best teacher. 

So after he helped me configure Open VPN and helped make a tunnel (link?) he said I needed a Proxy server, he recommended "Squid" and in addition to that he recommended "Webmin" to configure squid

After I configured and installed squid and webmin I proceed to configure squid via webmin, but here's the kicker, squid wont Initialize. I get the following error

```
Initializing the Squid cache with the command /usr/local/squid/sbin/squid -f /usr/local/squid/etc/squid.conf -z ..

2004/12/06 17:18:53| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache: (13) Permission denied
Squid Cache (Version 2.5.STABLE7): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
```
I then went to the terminal and typed "sudo /usr/local/squid/sbin/squid -f /usr/local/squid/etc/squid.conf -z" and got the same error.

Why is this happening and how can I fix it. Remember, I'm not a UNIX buff so please explain everything in detail

Thanks


----------



## bkaron (Dec 6, 2004)

oh, here is the QUICKSTART guid



> Squid QUICKSTART
> 
> $Id: QUICKSTART,v 1.4.2.4 2003/07/18 08:53:27 hno Exp $
> 
> ...


----------



## rbb (Dec 6, 2004)

What are the permissions on /usr/local/squid/var ?  Who owns that directory?  Go through and make sure that the web user, usually 'www' can read/write to that/those directories.  You can change it:

To change owners:

#chown www /usr/local/squid/var

Permissions:

# chmod u+rw /usr/local/squid/var


----------



## bkaron (Dec 6, 2004)

Ok, using Webmin I wnet to the administrative options tab and changed 

"RUN AS UNIX USER" to WWW

Now when I go to initialize the cache this is all that happens

2004/12/07 00:14:37| Creating Swap Directories

and it just stays like this, am I done? What now?


----------



## rbb (Dec 6, 2004)

Are there any indications that squid is running?  If you can get to the command line, just type:

% ps ax

And look for anything that says squid.


----------

