Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Oct 2003 11:35:45 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        chael@southgate.ph.inter.net
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Log every access to a file
Message-ID:  <20031027113545.GB11587@happy-idiot-talk.infracaninophile.co.uk>
In-Reply-To: <000c01c39c3e$72c47950$fe01a8c0@JMICH>
References:  <000c01c39c3e$72c47950$fe01a8c0@JMICH>

next in thread | previous in thread | raw e-mail | index | archive | help

--qcHopEYAB45HaUaB
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Oct 27, 2003 at 11:57:31AM +0800, chael@southgate.ph.inter.net wrot=
e:

> 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=
=2Econf would be greatly appreciated ?? :-)

Syslog.conf doesn't work that way: application processes themselves
decide what log messages to generate and pass them to syslogd(8).
syslogd(8) then takes care of writing those log messages into the log
files, together with timestamps and other administrivia as required.
/etc/syslog.conf is all about directing that flow of messages into the
appropriate files categorized by priority and by what application made
them.

Samba has extensive logging capabilities itself -- which generally
bypass syslog entirely, although there are options available to use
syslog.  It will certainly log who is accessing the server and from
what machines.  I don't think it has the capability to monitor
accesses down to the level of a particular file though, but read the
manuals carefully to be sure.

If you really need to log all accesses to the file, then probably your
best bet is to only make the file available via a web interface, which
can be set to require passwords before it will allow access and will
supply the logs you require.  Alternatively, databases such as
postgres or mysql can keep detailed logs of all queries run against
them. =20

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

--qcHopEYAB45HaUaB
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQE/nQMQdtESqEQa7a0RAmyzAJ4mP/GN5XmPrBYK0vc9zvF3Ga9rkACeN0me
gPGiiJD2ZtJIDSTVrMaPMts=
=anyx
-----END PGP SIGNATURE-----

--qcHopEYAB45HaUaB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031027113545.GB11587>