====== mtree ====== ===== mtree as a tripwire replacement ===== With more you can extract several file system parameters and compare it later on with your files. You can use it to build a poor mans IDS or you can dump owner, permissions and flags to a file and repair messed up permissions later again. * Generate a file hashes for a directory ''mtree -c -k cksum,md5digest,sha1digest,ripemd160digest,size,time'' ===== create a permission specification and apply it to fix wrong permissions ===== Create a specification file from a directory with the correct permissions with the following command: cd /path/to/directory mtree -c > spec.txt Ran the following command to fix all the file meta data: cd /path/to/directory mtree -f spec.txt -U ===== Links ===== * https://forums.freebsd.org/threads/tip-mtree-hids-script.7074/