Log every access to a file

Cordula's Web webmaster at cordula.ws
Mon Oct 27 05:30:33 PST 2003


> How do you create/add a system log to monitor every access to a
> specific file (say a database file accessed through samba)? A sample
> line for syslog.conf would be greatly appreciated ?? :-)

Serve this file from an NFS-mounted partition and have nfsd
log all file accesses.

Is there a better way? Perhaps some kind of debugging option
in the VFS or UFS (1 or 2) code? Or a modified union-fs or nullfs
layer, which would intercept all filesystem calls and log them? Hmmm...

-- 
Cordula's Web. http://www.cordula.ws/



More information about the freebsd-questions mailing list