On Thursday 21 July 2005 00:38, Amit Aronovitch wrote:
> * I have a shared directory tree, world writable,...
> ...
> * Recently I found that most of the contents of this dir had been wiped
>   out completely.

The first step to limit the damage is to make sure that the directory
is mode 1777 and not 777 -- The sticky bit (run ls -l and read the
permission carefully) in Linux and most modern Unices change the
semantics of directory writing. A process that tries to change
directory contents (remove files, rename files, etc.) need
to satisfy two conditions:
        - Have write permission, of course, and....
        - Be the owner of the relevant file/subdirectory.

This would isolate the problem to a specific user (or the all
powerfull root).

>  Next time it happens, I want to find out which machine/user/process is
> doing it

NFS may help you here. Why not simply tcpdump the NFS port to a huge
log file (better not in /tmp :-) and after it happens use ethereal
to analyze the result?

>  Any ideas of a simple way to do that? Is there a way to tell nfs-serv
> to "issue a log message if this and that file is touched"?

Well, if it's open source you can certainly patch this functionality
into it...

-- 
Oron Peled                             Voice/Fax: +972-4-8228492
[EMAIL PROTECTED]                  http://www.actcom.co.il/~oron
ICQ UIN: 16527398

We are all lying in the gutter, but some of us are looking at the stars.
-Oscar Wilde

=================================================================
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]

Reply via email to