[Samba] Delete files
mikel at quantecllc.com
Tue Oct 22 23:40:01 GMT 2002
Yes, I need more info! :P The users here have a bad habit of deleting files
that they then need next week. Or the next day. Or whenever later.
Any help would be GREATLY appreciated, and I'll start digging myself.
| Michael Luevane * Network Administrator |
| Quantec, LLC * 503-228-2992 |
| mikel at quantecllc.com * http://www.quantecllc.com |
From: John H Terpstra [mailto:jht at samba.org]
Sent: Tuesday, October 22, 2002 4:31 PM
To: Michael Luevane
Cc: samba at lists.samba.org
Subject: Re: [Samba] Delete files
On Tue, 22 Oct 2002, Michael Luevane wrote:
> Hello, all.
> What mechanism does samba use to delete a file on a *nix box when deleted
> from a connected Win2k machine?
> In other words, does it run the rm -f command? Some other command? Who
> it run as? Can I intercept the command and insert my own script?
It unlinks the file, but you can use a loadable VFS module to change the
way that low level file system calls get handled.
> I'm interested in creating an undelete shell script that keeps files from
> "accidentally-on-purpose" being erased from the fileserver.
Have you checked the samba source code. Samba-2.2.6 has a recycle bin
facility that might fit your needs.
The samba-team binary and source RPM packages for Caldera OpenLinux, SuSE
Linux, Red Hat Linux and Mandrake Linux all include ready to run loadable
VFS modules for this recycle bin functionality.
If you need more info please ask.
- John T.
John H Terpstra
Email: jht at samba.org
More information about the samba