Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am getting this message when setting up squid for the first time, on mac os x using webmin.

Your Squid cache directory /usr/local/squid/var/cache has not been initialized.This must be done before Squid can be run.

When i click on the initialize cache button, i get the message

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

2011/09/15 10:05:44| Creating Swap Directories

when i go back to start squid it takes me to the first message it hasnt initialized the cache, what could be the problem?

share|improve this question
1  
is squid running under a different user? check the permissions on /usr/local/squid and the logs (cant tell you where they would be, check the config file for clues or look in /var/log/ –  Silverfire Sep 15 '11 at 7:18
    
I am running it as the root –  Gatura Sep 15 '11 at 7:21

3 Answers 3

up vote 1 down vote accepted

Yes, This is permission issue. What are the permissions on /usr/local/squid/ ? Who owns that directory? You can change it:

To change owners:

chown squid /usr/local/squid/

Permissions:

chmod u+rw /usr/local/squid

share|improve this answer

Check the permissions on /usr/local/squid/ are set to the user squid runs under (even when started from root squid uses another user unless you call the squid binary directly (highly doubt it))

run something like this

chown -R squid /usr/local/squid/

where squid is the user squid is running under as set by the init.d script (or rc.d or whatever) then try starting it again.

if you cannot find the user you are running under check the squid.conf

share|improve this answer
    
Did you mean chown perhaps? –  Zoredache Sep 15 '11 at 7:37
    
yes, yes i did. thanks :) –  Silverfire Sep 16 '11 at 0:20

As i know

$squid -z

prepare all needed directories and files.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.