Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trace for a folder deletion

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
IL
Hi,

We have folders/files dissapearing randomnly.
The server volumes are mounted via NFS to other Unix machines.
Any idea on how to setup a trace that will gather the system info ONLY for a folder/file deletion events ?

"Long live king Moshiach !"
 
You have a number of options here. You could write a logging wrapper for rm / rmdir ( i.e. a script that encapsulates a command you are disguising, rather than Eminem performing on a tree trunk ).

If your accounting system is set up, then lastcomm might help.

Alternatively, a regular search through .sh_history for each user?
 
"( i.e. a script that encapsulates a command you are disguising, rather than Eminem performing on a tree trunk )."

LOL here boss!
 
Thanks,

But unfortunately I have to trace the deletion that is probably done not by "rm" ,but by c++ application.

We have Macintoshes and Unix systems mounting those volumes - so the best I can look for in the trace is some "unlink" event.

Anybody has got experience with such a mission ? "Long live king Moshiach !"
 
do you feel file deletions incorrect? I think they are appropriate as you allowed people to remove files. Check if permissions arent too loose on your directories (ie +w on staff group or o+w) and set minimal umask for users, check if your nfs isnt running in root-for-world mode :p
Yes "trace" is common tool for tracing system calls for statistic purposes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top