Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We found one of environments that the files are getting deleted from /opt/ac60 directories. The files getting deleted seemed to be random. Sometime whole folders were deleted and sometimes it was few files in the folder.
What logging do we have enabled:
We enabled the audit rpm enabled on the servers.
audit-1.0.16-3.el4
audit-libs-1.0.16-3.el4
audit-libs-devel-1.0.16-3.el4
We started the Auditd services (service auditd start) and added the watch.
We found one of environments that the files are getting deleted from /opt/ac60 directories. The files getting deleted seemed to be random. Sometime whole folders were deleted and sometimes it was few files in the folder.
What logging do we have enabled:
We enabled the audit rpm enabled on the servers.
audit-1.0.16-3.el4
audit-libs-1.0.16-3.el4
audit-libs-devel-1.0.16-3.el4
We started the Auditd services (service auditd start) and added the watch.
What logs do we have:
We did manage to get a few unlink and rmdir commands in the audit logs. Sample below:
Any help would be appreciated.
Well, since you've got user group, time the command was performed, you can look at the output of "last", to see who was logged in during the event. From there, you can look at their shell-history file, to see if they did anything (note: if they're logged in while you're looking, get them to log out, so the shell history will be written and up-to-date). Also, check the cron jobs, since something may be monitoring that directory, and doing a file purge, based on date/time stamps on the files.
Can any filesystem monitoring tool be helpful under this scenerio?
Not unless you write some custom code to take a 'snapshot' of the files/directories in question, write them to a log file, and use something like logwatch to see when it changes.
I am poor in writing script?
Anyone who can help me with this script/any tool?
As we tell everyone...we can HELP you, but aren't going to write it FOR you. There are lots of bash tutorials available through Google, that can help get you started.
After you get something going, come back and post what you've written, and where you're getting stuck.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.