Linux – How to find out who is deleting files on a Linux server

filesystemslinuxwindows

We have a Linux server which is Ext4 and another Linux Server which has an ISCSI where Windows clients have shared folders.I need to

  1. Allow users to modify files and not delete them. A user has permission to modify content, but cannot delete the files itself.
    1. Audit all file add/delete/modify operations in a English like log
      format.
    2. Send alerts if attempts are bieng made to delete

Best Answer

If windows clients are mounting Samba/CIFS shares then you should check out full_audit.so module for Samba.

Samba: Logging User Activity

Samba - file audit log with full_audit

Google Search - samba full_audit