Directory Monitoring?

Status
Not open for further replies.

antfry256m2

Cadet
Joined
Oct 24, 2013
Messages
1
I was wondering if any one had a solution for me, I need to monitor a directory for any changes eg, modification, deletions, renames.

Does anyone have software that will do this for me, I tried "Directory Monitor" but it only is able to find out if the deletion was done on the computer that runs the software.

A script would be fine as well.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
A couple of people have asked for something like this, but there really isn't. Even on Windows Server I'm not sure I've heard of anything that can do this.

An option is to increase the logging of Samba to as much as debugging, but you will generate a massive amount of logs in very little time.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
If you're using CIFS there is a VFS module called "Full Audit". See here: https://www.samba.org/samba/docs/man/manpages/vfs_full_audit.8.html

It should be enabled on a per-share basis. Note that although VFS modules are stackable (you can have several of them in one line), you cannot have two lines in a share definition containing vfs objects. This means that you will need to create an auxiliary parameter for your share containing the following:

"vfs objects = shadow_copy2 zfsacl streams_xattr full_audit"
(the aio_pthread vfs object doesn't actually do anything in FreeBSD, but we leave it in FreeNAS anyway).

Note that excessive logging can incur a performance penalty. Be sure also to put a quota on whatever dataset you designate as the target for your audit logs.
 
Status
Not open for further replies.
Top