LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-08-2004, 11:06 PM   #1
phatboyz
Member
 
Registered: Feb 2004
Location: Mooresville NC
Distribution: CentOS 4,Free BSD,
Posts: 358

Rep: Reputation: 30
Help with squid Swap file


I have just installed squid on another machine and have gotten a error message that i have never seen before. Here is the error

[root@server root]# vi /usr/local/squid/etc/squid.conf
[root@server root]# /usr/local/squid/sbin/squid -z
2004/03/09 00:02:32| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache/00/05: (13) Permission denied
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 10
[root@server root]# cd /usr/local/squid/var/cache/00/
[root@server 00]# ls
00 01 02 03 04
[root@server 00]# mkdir 05
[root@server 00]# cd
[root@server root]# /usr/local/squid/sbin/squid -z
2004/03/09 00:03:22| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache/00/06: (13) Permission denied
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 10
[root@server root]#


[root@server root]# vi /usr/local/squid/etc/squid.conf
[root@server root]# /usr/local/squid/sbin/squid -z
2004/03/09 00:02:32| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache/00/05: (13) Permission denied
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 10
[root@server root]# cd /usr/local/squid/var/cache/00/
[root@server 00]# ls
00 01 02 03 04
[root@server 00]# mkdir 05
[root@server 00]# cd
[root@server root]# /usr/local/squid/sbin/squid -z
2004/03/09 00:03:22| Creating Swap Directories
FATAL: Failed to make swap directory /usr/local/squid/var/cache/00/06: (13) Permission denied
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
CPU Usage: 0.000 seconds = 0.000 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 10
[root@server root]# /usr/local/squid/sbin/squid -NCd1
WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log
/usr/local/squid/var/logs/cache.log: Permission denied
messages will be sent to 'stderr'.
2004/03/09 00:11:30| WARNING: Closing open FD 2
2004/03/09 00:11:30| Starting Squid Cache version 2.5.STABLE4 for i586-pc-linux-gnu...
2004/03/09 00:11:30| Process ID 2411
2004/03/09 00:11:30| With 1024 file descriptors available
2004/03/09 00:11:30| Performing DNS Tests...
2004/03/09 00:11:30| Successful DNS name lookup tests...
2004/03/09 00:11:30| DNS Socket created at 0.0.0.0, port 1027, FD 3
2004/03/09 00:11:30| Adding nameserver 207.69.188.187 from /etc/resolv.conf
2004/03/09 00:11:30| Adding nameserver 207.69.188.186 from /etc/resolv.conf
FATAL: Cannot open '/usr/local/squid/var/logs/access.log' for writing.
The parent directory must be writeable by the
user 'squidadm', which is the cache_effective_user
set in squid.conf.
Squid Cache (Version 2.5.STABLE4): Terminated abnormally.
CPU Usage: 0.050 seconds = 0.040 user + 0.010 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 287
Aborted
[root@server root]# cd /usr/local/squid/var/logs/
[root@server logs]# ls
[root@server var]# ls -l
total 8
drwxr-xr-x 3 root root 4096 Mar 7 23:07 cache
drwxr-xr-x 2 root root 4096 Feb 21 20:52 logs


How many of these swap directorys do I need? Also how do I change the folder so a use "squidadm" can write to it? I am not sure whats up. I can not start squid yet.

Last edited by phatboyz; 03-09-2004 at 02:27 PM.
 
Old 03-29-2004, 12:24 PM   #2
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Don't know if you have solved your problem yet.

do "ls -al /usr/local/squid/var/cache"
u should see something like

drwxr-xr-x 18 squid squid ./
drwxr-xr-x 10 root root ../
drwxr-xr-x 258 squid squid 00/
drwxr-xr-x 258 squid squid 01/
drwxr-xr-x 258 squid squid 02/
[etc]

if you don't see the name of the correct user (in this example, squid) next to the current directory (./) and sub directories, you need to change the owner. "chown squid.squid ./" (as root)

the format is "chown user.group foldername" (or filename)

If the user is not correct that is why you are getting the access denied errors. HTH
 
Old 04-28-2004, 09:56 PM   #3
Hell_Spawn
LQ Newbie
 
Registered: Apr 2004
Location: Nowra
Distribution: Slackware 9.1
Posts: 1

Rep: Reputation: 0
hmm i have no user group squid ...

i have tried almost all the faq's and forums i can find this doesnt seem to fix the problem .....

any help here is the error msg one more time btw its the only one i get as opposed to the earlier post

/usr/local/squid/sbin# ./squid -z
2004/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
 
Old 10-26-2005, 07:59 AM   #4
vodkamilkshake
LQ Newbie
 
Registered: Oct 2005
Posts: 1

Rep: Reputation: 0
don't know whether your problem has been solved or not still if it can help some one else.

in squid.conf file, change value of "cache_effective_user" to squid (or some thing else). this is the user that squid runs as. also do a chown squid /usr/local/squid/* as well.

Last edited by vodkamilkshake; 10-26-2005 at 08:00 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
swap in squid alvi2 Linux - Networking 1 09-26-2005 08:13 PM
Squid swap folder creation problem selvamporko Linux - Software 1 06-22-2005 08:56 PM
Memory/Swap consumption problem with squid and kget drumvudu SUSE / openSUSE 0 02-03-2005 08:10 AM
squid cache server- error creating swap directory debloxie Linux - Networking 4 01-19-2004 12:49 AM
Swap file sparkplug55 Linux - Newbie 2 08-11-2003 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration