Is there a way to log accesses files and folders on FreeNAS shares?

Status
Not open for further replies.

Raju

Cadet
Joined
May 3, 2017
Messages
2
How do you log all files and folders accessed through FreeNAS? I manage a FreeNAS that has multiple shares accessed by multiple people on multiple OS's (Mac, Win, Linux). I'm trying to keep a detailed access log that shows:

  • who accessed file
  • what file they accessed
  • the time
  • and the action (read, modified, deleted)
Can this be done in a way that will work on FreeNAS host or any Linux system that is sharing files?
 
Joined
Jul 3, 2015
Messages
926
Are you using SMB as your sharing protocol?

If so you can add the below to the SMB Aux parameters

Code:
full_audit:prefix = %u|%I|%m|%S
full_audit:priority = notice
full_audit:failure = connect
full_audit:success = open mkdir unlink rmdir rename


and then add the VFS Object full_audit to the share.

After that you could pipe that info to a syslog server if you like.
 
Last edited by a moderator:

Raju

Cadet
Joined
May 3, 2017
Messages
2
thanks for sharing, yes i am able to get the logs in /var/log/messages.
later i will redirect these logs to specified file.

Thanks.
 
Status
Not open for further replies.
Top