Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: Gaetan on December 09, 2010, 08:36:34 PM

Title: Moving Dansguardian log files to a different location
Post by: Gaetan 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 ?
Title: Re: Moving Dansguardian log files to a different location
Post by: cactus 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
Title: Re: Moving Dansguardian log files to a different location
Post by: Gaetan 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
Title: Re: Moving Dansguardian log files to a different location
Post by: Gaetan 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
Title: Re: Moving Dansguardian log files to a different location
Post by: chris burnat on December 15, 2010, 03:04:33 PM
Moving to Contribs section of the Forums.