Solved

CentOS - Squid + SquidGuard

Posted on 2011-09-09
10
1,579 Views
Last Modified: 2012-05-12
I have a sever with SQUID + SQUIDGUARD in CentOS, but squidguard doesn´t block URL. I received information that "emergency mode".
I apply all configuration that URL https://help.ubuntu.com/community/SquidGuard , but not resolve my problem.
What can I do to resolve this problem?
Regards,
Marcelo
0
Comment
Question by:fmarcelo14
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
10 Comments
 
LVL 11

Expert Comment

by:Ove
ID: 36517035
what do you mean by " I received information that "emergency mode"." ???
What are the logs telling ?

Ove
0
 

Author Comment

by:fmarcelo14
ID: 36525819
Squidguard not block and not redirect navegation to URL block.
And I received log:
login as: root
root@10.7.0.16's password:
Last login: Fri Sep  9 12:43:34 2011 from spmob297.klabin.net
[root@masrv044 ~]# tail -f /var/log/squidguard/squidGuard.log
2011-09-11 04:02:05 [16153] Added UserList source: rmfilho
2011-09-11 04:02:05 [16153] Added UserList source: fdeganutti
2011-09-11 04:02:05 [16153] Added UserList source: gcosta
2011-09-11 04:02:05 [16153] Added UserList source: mnbahena
2011-09-11 04:02:05 [16153] Added UserList source: lilian
2011-09-11 04:02:05 [16153] Added UserList source: fbertoni
2011-09-11 04:02:05 [16153] Added UserList source: validacao
2011-09-11 04:02:05 [16153] init domainlist /var/lib/squidguard/ads/domains
2011-09-11 04:02:05 [16153] /var/lib/squidguard/ads/domains: Permission denied
2011-09-11 04:02:05 [16153] going into emergency mode
0
 
LVL 11

Expert Comment

by:Ove
ID: 36525931
pls check owner-info on  /var/lib/squidguard/ads/domains
i would suggest a
chown -R <UsernameOfYourSquidGuardUser>:<GroupnameOfYourSquidGuardUser> /var/lib/squidguard

Ove
0
Database Solutions Engineer FAQs

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller single-server environments.

 

Author Comment

by:fmarcelo14
ID: 36533043
Not resolved.

Permissions:
[root@masrv044 ~]# cd /var/lib/squidguard
[root@masrv044 squidguard]# ls -la
total 116
drwxrwxr-x+ 14 squid squid 4096 Sep  1 11:29 .
drwxr-xr-x  32 root  root  4096 Sep  1 09:24 ..
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 ads
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 adult
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 aggressive
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 audio-video
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 drugs
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 forums
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 gambling
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 hacking
lrwxrwxrwx   1 squid squid   17 Sep  1 11:29 local -> /etc/squid/local/
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 mail
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 proxy
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 violence
drwxrwxr-x+  2 squid squid 4096 Sep  1 11:29 warez
[root@masrv044 squidguard]# cd ads
[root@masrv044 ads]# ls -la
total 96
drwxrwxr-x+  2 squid squid  4096 Sep  1 11:29 .
drwxrwxr-x+ 14 squid squid  4096 Sep  1 11:29 ..
-rw-rwx---+  1 squid squid  4623 Mar 31  2010 domains
-rw-rwx---+  1 squid squid 20480 Sep  2 06:33 domains.db
-rw-rwx---+  1 squid squid    68 Mar 31  2010 expressions
-rw-rwx---+  1 squid squid  4988 Mar 31  2010 urls
-rw-rwx---+  1 squid squid 20480 Sep  2 06:33 urls.db
[root@masrv044 ads]#


Log of error:
login as: root
root@10.7.0.16's password:
Access denied
root@10.7.0.16's password:
Last login: Mon Sep 12 14:45:03 2011 from 10.22.7.16
[root@masrv044 ~]# chown -R squid:squid /var/lib/squidguard
[root@masrv044 ~]# service squid restart
Stopping squid: ................                           [  OK  ]
Starting squid: .                                          [  OK  ]
[root@masrv044 ~]# tail -f /var/log/squidguard/squidGuard.log
2011-09-13 16:28:26 [30936] Added UserList source: rmfilho
2011-09-13 16:28:26 [30936] Added UserList source: fdeganutti
2011-09-13 16:28:26 [30936] Added UserList source: gcosta
2011-09-13 16:28:26 [30936] Added UserList source: mnbahena
2011-09-13 16:28:26 [30936] Added UserList source: lilian
2011-09-13 16:28:26 [30936] Added UserList source: fbertoni
2011-09-13 16:28:26 [30936] Added UserList source: validacao
2011-09-13 16:28:26 [30936] init domainlist /var/lib/squidguard/ads/domains
2011-09-13 16:28:26 [30936] /var/lib/squidguard/ads/domains: Permission denied
2011-09-13 16:28:26 [30936] going into emergency mode
0
 
LVL 11

Expert Comment

by:Ove
ID: 36533064
Your filepermissions (chmod) are definitely WRONG!
dir's should have drwxr-xr-x and files should have: -rw-r--r--

Look at mine:
XDEB01:/var/lib/squidguard/db# ls -la
insgesamt 25704
drwxrws--- 36 proxy proxy    4096 15. Jul 2010  .
drwxr-xr-x  4 root  root     4096 15. Jul 2010  ..
-rw-r--r--  1 proxy proxy 3150873 15. Jul 2010  20070227165821_fr.tar.gz
-rw-r--r--  1 proxy proxy  335999 15. Jul 2010  20070227165821_sg.tar.gz
-rw-r--r--  1 proxy proxy 3166556 15. Jul 2010  20070228091046_fr.tar.gz
-rw-r--r--  1 proxy proxy 8125414 15. Jul 2010  20070228091046_shalla.tar.gz
-rw-r--r--  1 proxy proxy 3166556 15. Jul 2010  20070228091946_fr.tar.gz
-rw-r--r--  1 proxy proxy 8125414 15. Jul 2010  20070228091946_shalla.tar.gz
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  adv
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  aggressive
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  automobile
drwxr-x--- 32 proxy proxy    4096 15. Jul 2010  BL
drwxr-sr-x  2 proxy proxy    4096 10. Nov 2010  black
drwxr-sr-x 14 proxy proxy    4096 15. Jul 2010  blacklists
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  chat
-rw-r--r--  1 proxy proxy     630 15. Jul 2010  COPYRIGHT
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  dating
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  drugs
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  dynamic
drwxr-xr-x  5 proxy proxy    4096 15. Jul 2010  finance
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  forum
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  gamble
-rwxr-xr-x  1 proxy proxy   14894 15. Jul 2010  getlists.sh
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  hacking
drwxr-xr-x  5 proxy proxy    4096 15. Jul 2010  hobby
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  isp
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  jobsearch
drwxr-sr-x  2 proxy proxy    4096 15. Jul 2010  malware
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  movies
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  music
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  news
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  porn
drwxr-xr-x  6 proxy proxy    4096 15. Jul 2010  recreation
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  redirector
drwxr-xr-x  4 proxy proxy    4096 15. Jul 2010  science
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  shopping
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  spyware
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  tracker
-rwx------  1 proxy proxy   23271 15. Jul 2010  update-squidguard-blacklists
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  violence
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  warez
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webmail
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webradio
drwxr-xr-x  2 proxy proxy    4096 15. Jul 2010  webtv
drwxr-sr-x  2 proxy proxy    4096 25. Mär 09:07 white
XDEB01:/var/lib/squidguard/db# cd adv/
XDEB01:/var/lib/squidguard/db/adv# ls -la
insgesamt 1192
drwxr-xr-x  2 proxy proxy   4096 15. Jul 2010  .
drwxrws--- 36 proxy proxy   4096 15. Jul 2010  ..
-rw-r--r--  1 proxy proxy 211445 13. Sep 21:22 domains
-rw-r--r--  1 proxy proxy 581632 13. Sep 21:22 domains.db
-rw-r--r--  1 proxy proxy 211445 13. Sep 21:22 domains.old
-rw-r--r--  1 proxy proxy  42447 13. Sep 21:22 urls
-rw-r--r--  1 proxy proxy  98304 13. Sep 21:22 urls.db
-rw-r--r--  1 proxy proxy  42447 13. Sep 21:22 urls.old
XDEB01:/var/lib/squidguard/db/adv#


Pls fix that and see if it's running.

Ove
0
 

Author Comment

by:fmarcelo14
ID: 36584259
Permissions OK now, but de problem persist. How can I resolved this problem?

Problem:
[root@masrv044 ads]# tail -f /var/log/squidguard/squidGuard.log
2011-09-22 17:09:58 [12598] Added UserList source: rmfilho
2011-09-22 17:09:58 [12598] Added UserList source: fdeganutti
2011-09-22 17:09:58 [12598] Added UserList source: gcosta
2011-09-22 17:09:58 [12598] Added UserList source: mnbahena
2011-09-22 17:09:58 [12598] Added UserList source: lilian
2011-09-22 17:09:58 [12598] Added UserList source: fbertoni
2011-09-22 17:09:58 [12598] Added UserList source: validacao
2011-09-22 17:09:58 [12598] init domainlist /var/lib/squidguard/ads/domains
2011-09-22 17:09:58 [12598] /var/lib/squidguard/ads/domains: Permission denied
2011-09-22 17:09:58 [12598] going into emergency mode


Permission Directory:
[root@masrv044 squidguard]# ls -la
total 116
drwxr-xr-x+ 14 squid squid 4096 Sep  1 11:29 .
drwxr-xr-x  32 root  root  4096 Sep  1 09:24 ..
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 ads
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 adult
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 aggressive
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 audio-video
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 drugs
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 forums
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 gambling
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 hacking
lrwxrwxrwx   1 squid squid   17 Sep  1 11:29 local -> /etc/squid/local/
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 mail
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 proxy
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 violence
drwxr-xr-x+  2 squid squid 4096 Sep  1 11:29 warez
[root@masrv044 squidguard]#

Permission File:
[root@masrv044 ads]# ls -la
total 96
drwxr-xr-x+  2 squid squid  4096 Sep  1 11:29 .
drwxr-xr-x+ 14 squid squid  4096 Sep  1 11:29 ..
-rw-r--r--+  1 squid squid  4623 Mar 31  2010 domains
-rw-r--r--+  1 squid squid 20480 Sep  2 06:33 domains.db
-rw-r--r--+  1 squid squid    68 Mar 31  2010 expressions
-rw-r--r--+  1 squid squid  4988 Mar 31  2010 urls
-rw-r--r--+  1 squid squid 20480 Sep  2 06:33 urls.db
[root@masrv044 ads]#


0
 
LVL 11

Expert Comment

by:Ove
ID: 36590201
pls post your squidGuard.conf

Ove
0
 
LVL 11

Expert Comment

by:Ove
ID: 36590235
and also /etc/squid.conf pls.

Ove
0
 

Author Comment

by:fmarcelo14
ID: 36590715
0
 
LVL 13

Accepted Solution

by:
Sandy earned 500 total points
ID: 37782829
sorry !!! but i prefer artica or dansguardian for this purpose
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

631 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question