1829494 Members
1520 Online
109991 Solutions
New Discussion

Re: Squid Error

 
logaraman
Regular Advisor

Squid Error

Hi ,

I have installed redhat AS 4.0 and the cache_dir and cache_log seem to be ok for the squid. But when i start the squid, i get the below error which is enclosed for your reference

9 REPLIES 9
Derek Whigham_1
Trusted Contributor

Re: Squid Error

Are you running squid as root, As the deamon does not seem to have root permissions
Divide and Conquer
logaraman
Regular Advisor

Re: Squid Error

Hi,

i checked out the dameon and its being owned by root .

Derek Whigham_1
Trusted Contributor

Re: Squid Error

From your output we get this.

Apr 25 15:55:23 localhost squid: Failed to make swap directory /squid-cache/squid0: (13) Permission denied.

a few questions

1) Does this directory exist
2) what are the permissions
3) Is there free disk space on sda3
Divide and Conquer
logaraman
Regular Advisor

Re: Squid Error

Hi Derek,

Pls find the response to ur questions
1) Does this directory exist?
Yes, the directory exists.
2)what are the permissions?
The permissions are 755 and is being owned by squid
3)Is there free disk space on sda3?
25 gb of space is available on sda3

Sergejs Svitnevs
Honored Contributor

Re: Squid Error

Please check, that swap directories have been created on your filesystems (according to http://www.squid-cache.org/Doc/FAQ/FAQ-11.html#ss11.22 ).

Regards

logaraman
Regular Advisor

Re: Squid Error

Hi ,

I had executed squid -z which never created the squid directories , so i copied the cache directories from an existing proxy which also works.
Vipulinux
Respected Contributor

Re: Squid Error

Hi

1st run squid as squid and not root.

You need to have correct ownership & permissions on the squid directories:

chown -R squid:squid /var/squid/cache

& also to the squid dir
usually

chown -R squid:squid /usr/local/squid
else
chown -R squid:squid /etc/squid

Cheers
Manuel Wolfshant
Trusted Contributor

Re: Squid Error

You are making a simple task difficult.
step 1: install the squid rpm. This will create the user (squid) and all required directories and files (including, for instance, those needed for logs and logrotate)

step 2: adjust /etc/squid/squid.conf to your needs, (including the spool directory)
In case you replace the default cache directory, please make sure to allow squid to write in the new top directory of the hierarchy (i.e. chown squid /var/spool/new_squid_spool && chmod u+rwx /var/spool/new_squid_spool)

step 3: issue /etc/init.d/squid start
On the first run it will create the hierarchy needed by squid (actually it will run squid -z); on subsequent runs it will just use the existing directories.

Do not blindly copy the cache structure from another server, unless you know EXACTLY what you are doing.
logaraman
Regular Advisor

Re: Squid Error

I had to re -install the OS and it worked well