On Thu, 21 Jul 2005, Amit Aronovitch wrote: > Situation: > ---------- > * I have a shared directory tree, world writable, shared by NFS server > (I'm not sure of server's OS - probably solaris, maybe linux) to many > client machines (whole network has common users/authentication scheme). > > * Recently Ifound that most of the contents of this dir had been wiped > out completely. This happened twice. > (and no, we're not close to filling the storage quota on the server).
you said "most of the content". not "all of the content". did you try to analyze what WSN'T erased and see if it teaches you anything? regarding this tracing - if it's a new enough system and has selinux, you might be able to put a file there, and tell selinux that it cannot be deleted. ofcourse, this requires root access, and selinux rules are not that easy to debug (better do that on your own machine first and test things there). note that you'll need to do it in two steps: 1. find out which client machine this command comes from (the NFS server does not see any client machine appliaction - it only sees NFS requests, and hence only has a client machine). 2. then, on this client mahcine, add tracking and find out which process does this. you could try something different with selinux: create a bunch of files in that directory, and make sure each of them can only be deleted from a certan client machine. if only one of them gets deleted next time - you'll know which client machine deleted it. again - use selinux for this (let's see if selinux is realy useable). an even easier "which client machine did it" solution, that'll work if each machine is used by a single user and you suspect this is a user process, not a root process: create a bunch of directories in that directory, each with rwx permissions only for one of the users of the client machines. then in each such directory create a file with rwx permissions for the same user. if, on the next wipe, only one of these directories is deleted, you'll know which user causes the deletion (assuming this was always the same user, and not different users using the same buggy application). the reason for using directories with files, and not just files, is that files in a world-writeable directory may be deleted by people even if they don't have access to these files, and you do not want to add the sticky bit to the existing directory. -- guy "For world domination - press 1, or dial 0, and please hold, for the creator." -- nob o. dy ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
