Koozali.org: home of the SME Server

Moving Dansguardian log files to a different location

Offline Gaetan

  • ***
  • 104
  • +0/-0
Moving Dansguardian log files to a different location
« on: December 09, 2010, 08:36:34 PM »
Hi,
I am trying to move the Dansguardian log file from the /var/log/dansguardian directory to the following one /home/e-smith/files/primary/files/dansguardian-logs.
(I move those files to be able to connect sawmill to the log files.)

After copying the current access.log file to the new location and having changed the dansguardian.conf file with the new location, I get the following error while trying to restart dansguardian service:

[root@sme2 dansguardian-logs]# /etc/init.d/dansguardian restart
Shutting down dansguardian:                                [ OK ]
Starting dansguardian: Error opening/creating log file. (check ownership and access rights).
I am running as clamav and I am trying to open /home/e-smith/files/primary/files/dansguardian-logs/access.log
                                                           [ FAILED ]



Here are the details regarding the new folder:


4 drwxr-xr-x  2 clamav clamav 4096 Dec  9 17:23 dansguardian-logs


and regarding the files within it:
[root@sme2 dansguardian-logs]# ls -als
total 50192
    4 drwxr-xr-x  2 clamav clamav     4096 Dec  9 17:23 .
    4 drwxr-s---  4 admin  shared     4096 Dec  9 17:10 ..
47992 -rw-r--r--  1 clamav clamav 49090256 Dec  9 19:33 access.log
 1696 -rw-r--r--  1 clamav clamav  1730999 Dec  9 19:33 access.log.1.gz
  488 -rw-r--r--  1 clamav clamav   493229 Dec  9 19:33 access.log.2.gz
    4 -rw-r--r--  1 clamav clamav       33 Dec  9 19:33 access.log.3.gz
    4 -rw-r--r--  1 clamav clamav       33 Dec  9 19:33 access.log.4.gz



How can I solve the issue ?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: Moving Dansguardian log files to a different location
« Reply #1 on: December 10, 2010, 08:39:27 AM »
I think it is better and easier to leave the logfiles where they should be and create a symbolic link in the files folder pointing to the dansguardian log folder perhaps?
Code: [Select]
ln -s /var/log/dansguardian/ /home/e-smith/files/ibays/Primary/files/dansguardian-logs/
You might need to enable FollowSymlinks for that ibay:
Code: [Select]
db accounts setprop Primary FollowSymLinks enabled
signal-event ibay-modify Primary
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Moving Dansguardian log files to a different location
« Reply #2 on: December 10, 2010, 09:31:12 AM »
Hi,
Ok, after a few test, the files appear while in the console ... but not on the FTP server ...
Gaetan
« Last Edit: December 10, 2010, 10:49:39 AM by Gaetan »

Offline Gaetan

  • ***
  • 104
  • +0/-0
Re: Moving Dansguardian log files to a different location
« Reply #3 on: December 10, 2010, 11:31:04 AM »
Hi,
After searching the forums, I have found the following link:

http://www.dungog.net/wiki/Smeserver-remoteuseraccess


It now does what I want.

Gaetan

Offline chris burnat

  • ****
  • 1,135
  • +2/-0
    • http://www.burnat.com
Re: Moving Dansguardian log files to a different location
« Reply #4 on: December 15, 2010, 03:04:33 PM »
Moving to Contribs section of the Forums.
- chris
If it does not work out of the box, please fill in a Bug Report @ Bugzilla (http://bugs.contribs.org)  - check: http://wiki.contribs.org/Bugzilla_Help .  Thanks.