[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1658
  • Last Modified:

CentOS - Squid + SquidGuard

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
fmarcelo14
Asked:
fmarcelo14
  • 5
  • 4
1 Solution
 
OveCommented:
what do you mean by " I received information that "emergency mode"." ???
What are the logs telling ?

Ove
0
 
fmarcelo14Author Commented:
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
 
OveCommented:
pls check owner-info on  /var/lib/squidguard/ads/domains
i would suggest a
chown -R <UsernameOfYourSquidGuardUser>:<GroupnameOfYourSquidGuardUser> /var/lib/squidguard

Ove
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
fmarcelo14Author Commented:
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
 
OveCommented:
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
 
fmarcelo14Author Commented:
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
 
OveCommented:
pls post your squidGuard.conf

Ove
0
 
OveCommented:
and also /etc/squid.conf pls.

Ove
0
 
fmarcelo14Author Commented:
0
 
SandyCommented:
sorry !!! but i prefer artica or dansguardian for this purpose
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 5
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now