LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 05-17-2006, 01:33 PM   #1
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Squid issue


Tried to post this on the squid-cache list but for some reason I get no reply to my subscribe messages on that list so figured I'd try it here:

OK This isn’t mentioned in the SQUID FAQ. I do see several postings of similar questions in their archives but none show a final solution.

Most answers say “check your permissions” (well duh!). So before anyone says that let me state I HAVE checked my permissions.

The full sequence of messages in syslog:
May 16 09:49:15 nighthawk squid[24523]: Squid Parent: child process 24590 started
May 16 09:49:15 nighthawk (squid): Cannot open '/usr/local/squid/logs/access.log' for writing. The parent directory must be writeable by the user 'nobody', which is the cache_effective_user set in squid.conf.
May 16 09:49:15 nighthawk /kernel: pid 24590 (squid), uid 3128: exited on signal 6 May 16 09:49:15 nighthawk squid[24523]: Squid Parent: child process 24590 exited due to signal 6 May 16 09:49:15 nighthawk squid[24523]: Exiting due to repeated, frequent failures

This is on FreeBSD 4.8 system. It hadn’t been booted for some time and recently was. Also the kernel was recompiled just to experiment with doing same as we needed to do this on another system to enable a SMP. However after the recompile the kernel config was reverted and recompiled again so should be the same as it was before (except for date of creation). I tested booting from the original kernel to see if that helped since it was the only change made to the system but it didn't help.

To test whether “nobody” could access the “parent directory” I did:
su –m nobody
cd /usr/local/squid
touch jcltest
ls –l jcltest
rm jcltest
cd /usr/local/squid/logs
touch jcltest
ls –l jcltest
rm jcltest
cp –p access.log access.log.old
echo hello >access.log #File was 0 bytes before this cat access.log cp –p access.log.old access.log.old

Above tests confirmed I could “write” a new file called jcltest into the “parent directory” as user “nobody” and also into the parent of the parent directory. It also confirmed I was able specifically to write into the file “access.log” as the user “nobody”. Obviously this is not a permission issue.

I also tried moving access.log to access.log.old to see if it wanted to create the file on startup but got the same error.

Any ideas? This seems to have been a problem many times but no one has ever posted a solution.
 
Old 05-18-2006, 08:13 AM   #2
zaichik
Member
 
Registered: May 2004
Location: Iowa USA
Distribution: CentOS
Posts: 419

Rep: Reputation: 30
You've demonstrated that the user nobody can write to the directories involved, as well as to the log. The squid log indicates that this is the problem. However, it might not be the real problem. The error message might simply be indicating the most common cause of the problem at hand.

What user actually owns access.log? It might be that squid requires the file to not just be writable, but actually owned, by cache_effective_user. Do you have squid itself running as the user nobody?
 
Old 05-18-2006, 08:47 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831

Original Poster
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
The file and the directory are owned by "nobody" which is the cache effective user in squid.conf. As mentioned I hadn't made any change to the squid configuration.

Is there a greater level of debugging I could enable that would tell me what the problem really is rather than having it guess the most common cause?
 
  


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
Squid/DNS Intermittent Issue win32sux Slackware 4 10-29-2009 04:59 PM
squid cache issue !! hitesh_linux Linux - Enterprise 16 04-23-2007 03:01 AM
Squid DNS issue in FC5 paulqwinn Linux - Networking 3 02-02-2007 12:33 PM
squid issue ahmad82pkn Linux - Networking 4 02-06-2006 08:33 AM
Squid relating Issue datagrey Linux - General 1 05-10-2005 10:30 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 08:28 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