April 25, 2024, 01:48:54 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: changing and initalizing cache directories  (Read 3880 times)

Offline keever

  • Linux Noob !
  • *
  • Posts: 14
changing and initalizing cache directories
« on: October 18, 2005, 10:13:56 PM »
General Information:

I using a PC with Fedora FC3 installed.  Squid 2.5 Stable came built with this distro.

My problem:

The default cache dir is /var/spool/squid.  Unfortunately /var is mounted on a much smaller partition than I want to use for squid.  So I wanted to move the cache dir to /usr/local/squid, which is on a partition with ample space.  After consulting with many web forums concerning SQUID configuraiton, I manually created the directory: /var/spool/squid, and then used chown to give 'squid' user and group onwership of the newly created directory  I then gave 755 perms to the /usr/local/squid directory.
Here are the perms for the directories:

[root@redprox local]# ls -las /usr/local/squid
total 16
8 drwxr-xr-x   2 squid squid 4096 Oct 18 15:05 .
8 drwxr-xr-x  12 root  root  4096 Oct 18 13:29 ..

So as you can see, 'squid' owns and has perms to the parent dir /usr/local/squid.

This is what I get for an error message when I try to initalize the /usr/local/squid cache directory:

squid -f /etc/squid/squid.conf -z

2005/10/18 15:09:10| aclParseIpData: WARNING: Netmask masks away part of the specified IP in '172.16.3.1-172.16.3.254/255.255.255.0'
2005/10/18 15:09:10| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/00: (13) Permission denied
Squid Cache (Version 2.5.STABLE11): Terminated abnormally.
CPU Usage: 0.001 seconds = 0.001 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0

How on earth does squid get a permission denied error when it has permission and ownership of /user/local/squid?  I even gave /usr/local/squid 777 perms, and it made no difference.   Just to confirm SQUID is being run as user squid within group squid.  What can be done to resolve this?


Also, if someone feels like it, can you tell me what the aclParseIpData Warning is all about?

Offline keever

  • Linux Noob !
  • *
  • Posts: 14
changing and initalizing cache directories
« Reply #1 on: October 18, 2005, 10:18:51 PM »
Oops, I should have posted this under the correct location.  Please ignore and delete, and I will post it in the appropriate location.

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
changing and initalizing cache directories
« Reply #2 on: October 19, 2005, 08:38:07 AM »
ok run  all these commands on ur shell:-

#chmod -R 777 /usr/local/squid/*
#chmod -R 777 /usr/local/squid
#chmod -R 777 /var/log/squid/*
#chmod -R 777 /var/log/squid

After that create swap directories again using thic command
#squid -z

I think , After that it will work

This topic is continued over here --> Permission denied when accessing webmin via squid proxy