When installing squid as cache server you have to create cache folder with “squid -z” command with out quotes. But when you are trying this you will see
/usr/local/squid/sbin# ./squid -z
2010/04/29 22:39:16
Creating Swap Directories
FATAL : Failed to make swap directory /usr/local/squid/var/cache: (13) Permission denied
Squid Cache (Version 2.5.STABLE5) : Terminated abnormally.
CPU Usage : 0.000 seconds = 0.000 user + 0.000 sys
This is due to that /usr/local/squid/var/cache folder is not owned by effective user. To resolve this issue follow below steps
Step1 : Create squid user(A normal user) if the squid user is not there
#useradd squid
Step2 : Specify the effective user entry in squid.conf file with squid as username by editing it.
#vi /usr/local/squid/etc/squid.conf
change the entry from
# cache_effective_user nouser
to
cache_effective_user squid
Save the file now
Step3 : Now change the ownership of the cache folder to squid user
#chown -R squid.squid /usr/local/squid/var/cache
Step4 : Now create cache directory with squid -z command
#squid -z
Now you will be out of issue.
Failed To Make Swap Directory Cache (13) Permission Denied
11/25/2010 10:35:00 PM Posted by Surendra Kumar AnneLabels: Proxy Servers
Subscribe to:
Post Comments (Atom)
2 comments:
Hi Surendra,
The steps are very well documented. I followed the same steps until it gave me an error at the step where we change the ownership "chown -R squid.squid /usr/local/squid/var/cache".
It says "chown: cannot access `/usr/local/squid/var/cache': No such file or directory"
Can you please tell me at what point of the installation is the `/usr/local/squid/var/cache' directory created
Hi Surendra,
The steps are very well documented. I followed the same steps until it gave me an error at the step where we change the ownership "chown -R squid.squid /usr/local/squid/var/cache".
It says "chown: cannot access `/usr/local/squid/var/cache': No such file or directory"
Can you please tell me at what point of the installation is the `/usr/local/squid/var/cache' directory created
Post a Comment