How to enable CSF dirwatch (Directory Watching)

Post Reply
Game Over
Junior Member
Posts: 2
Joined: 28 Nov 2019, 10:27

How to enable CSF dirwatch (Directory Watching)

Post 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

tanfwc
Junior Member
Posts: 7
Joined: 18 Sep 2019, 07:52

Re: How to enable CSF dirwatch (Directory Watching)

Post 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

Game Over
Junior Member
Posts: 2
Joined: 28 Nov 2019, 10:27

Re: How to enable CSF dirwatch (Directory Watching)

Post 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?

tanfwc
Junior Member
Posts: 7
Joined: 18 Sep 2019, 07:52

Re: How to enable CSF dirwatch (Directory Watching)

Post by tanfwc »

Any information given in the log fille? /var/log/lfd.log

Post Reply