Page 1 of 1

How to enable CSF dirwatch (Directory Watching)

Posted: 28 Nov 2019, 12:57
by Game Over
Hey guys .
I just searched in forum and didn't find any thing related to my question so would you please help my to how configure CSF to watching any changed file in specific directory?
I gave FTP access to a freelancer and he's trying to develop some script but I don't trust him so I wanna to watch that directory .

I just edited

Code: Select all

/etc/csf/csf.dirwatch
and here is my code :

Code: Select all

###############################################################################
# Copyright 2006-2016, Way to the Web Limited
# URL: http://www.configserver.com
# Email: sales@waytotheweb.com
###############################################################################
# The following should be a list of directories and files that you want to be
# alerted when they change. You must specify full paths for each entry.
#
# lfd uses a simple md5sum match from the output of "ls -laAR" on the entry and
# so will traverse directories if specified.
#
# An example where you might want to use this is /var/spool/cron
#
/home/public_html/MyUser/
then I did

Code: Select all

csf -r
service lfd restart
and in my

Code: Select all

/etc/csf/csf.conf
file I changed these values :

Code: Select all

LF_DIRWATCH = "30"
LF_DIRWATCH_FILE = "1"
and saved changes then restarted "CSF" but it didn't send any email when I changed some of my files about 2 hours ago.
Where should I set my email address?
Note : I'm using DirectAdmin on Centos 6
Thanks in advance

Re: How to enable CSF dirwatch (Directory Watching)

Posted: 03 Dec 2019, 06:11
by tanfwc
For configserver, the watch does not seems to applies for new files from empty directory. It might be changed from the original file or suspicious file. You need to use another tool called inotifywait for new files

Re: How to enable CSF dirwatch (Directory Watching)

Posted: 03 Dec 2019, 15:29
by Game Over
Thank you so much dear tanafwc for your replying .
It also didn't work for changing exist files.

Did I miss something?

Re: How to enable CSF dirwatch (Directory Watching)

Posted: 19 Dec 2019, 03:06
by tanfwc
Any information given in the log fille? /var/log/lfd.log