Preventing Permanate Loss of Files

Preventing Permanate Loss of Files

Post by Brad » Sat, 28 Jun 2003 02:52:12



I am currently running samba, on a redhat 8.0 machine. One of my
network users deleted a file that was critical from their workstation.
I am looking to create a directory that will store the files deleted
off the server (similar to a windows recycling bin) so I can
permanatly delete them later. If anyone can reply with web addresses
or information, I would greatly appreciate it. Thank You In Advance!

Brad

 
 
 

Preventing Permanate Loss of Files

Post by dav.. » Sat, 28 Jun 2003 02:57:07



> I am looking to create a directory that will store the files deleted
> off the server

Unfortunately, there is no such thing. If a file is "critical", do not
give permissiono to delete it on the directory level. Make a backup,
be clear about what it means restoring the whole system because someone
fsckup and teach your users to _not_ delete things they don't own.

Davide

 
 
 

Preventing Permanate Loss of Files

Post by Dave Uhrin » Sat, 28 Jun 2003 03:26:40



> I am currently running samba, on a redhat 8.0 machine. One of my
> network users deleted a file that was critical from their workstation.
> I am looking to create a directory that will store the files deleted
> off the server (similar to a windows recycling bin) so I can
> permanatly delete them later. If anyone can reply with web addresses
> or information, I would greatly appreciate it. Thank You In Advance!

chmod 1777 shared_directory

Sets the sticky bit so no user can delete other user's files.  If the
"critical" file is owned by the dumb-ass user then use chattr to prevent
deletion without changing the file attributes again.

 
 
 

Preventing Permanate Loss of Files

Post by Brad » Sat, 28 Jun 2003 07:30:56


So it is not possible to "force" samba into interperating the delete
command by workstations as a command to move that file into a
temporary directory?
If moving them in that manner isn't possible, does anyone know of
scripts/methods for backing up directories on the linux machine on a
windows machine? Also Is there anyway to have a file change its status
to read only after it hasn't been modified for x amount of days?

Thanks Again for All the Great Advice.

 
 
 

Preventing Permanate Loss of Files

Post by dav.. » Sat, 28 Jun 2003 13:53:31



> So it is not possible to "force" samba into interperating the delete
> command by workstations

Samba doesn't "interpretate" commands, it only allows a client to see
a directory as a locally-mounted-disk. Every operation performed by
the client is performed directly on the filesystem.

Quote:> scripts/methods for backing up directories on the linux machine on a

...hu....say again? Can't you use tar/cron to schedule a backup?

Quote:> to read only after it hasn't been modified for x amount of days?

use find ... -exec chmod to locate and change the status of files.

Davide

 
 
 

Preventing Permanate Loss of Files

Post by Tim Wunde » Sat, 28 Jun 2003 22:45:59



Quote:> So it is not possible to "force" samba into interperating the delete
> command by workstations as a command to move that file into a
> temporary directory?

Look in to VFS for samba. Found in the samba source directory
examples/VFS. Specifically, the recycle module in examples/VFS/recycle.
You'll probly need to download the samba source as I don't know if RHL
8.0's samba RPMs come with the VFS stuff installed.

You could try, as root
# locate recycle.so
to see if you find the file recycle.so

If you don't locate it, download the samba source.

Once you compile and install the VFS stuff, just add something like:
         vfs object = /usr/local/samba/recycle.so
         vfs options = /etc/samba/recycle.conf
to the share in your smb.conf file, and create the requisite
recycle.conf file. There are examples that come with the samba source.

Oooh... I just looked on my home RHL 8.0 system and recycle.so exists in
/usr/lib/samba/vfs and a sample recycle.conf file exists in
/usr/share/doc/samba-2.2.7/recycle.conf

So this should be fairly painless for you.

HTH,
Tim

 
 
 

1. Reiser FS not preventing data loss after system freeze

I had a problem where I would get a system freeze on Mandrake 8.1 as
it tried to shut down the USB devices. The only solution was a hard
reset. On reset, the resolv.conf file was corrupt and the ALSA driver
loads under protest as it seems to be eating gobbledygook from
somewhere.

I though the problem was due to the USB interface being shut down
before the Alcatel USB Speedtouch modem driver was killed so I made a
script to disconnect from the internet, shut down the driver, shut
down USB then shut down the machine. This didn't fix the problem. Now
when it froze and I rebooted I found other files corrupt. Files which
were recently opened, then closed, by applications.

The question I have is, isn't Reiser FS supposed to ensure files don't
get corrupted after a crash or hard reset? Or at least, provide a
layer of protection.

Am I expecting too much from Journaling file systems? System freezes
on Win 2K never caused me this much damage.

BTW The USB problem is another issue, I have a quick, dirty fix of not
actually shutting the USB down like Mandrake 8.0 didn't. I will send a
bug report to Mandrake, but, oh my! Intermittant hardware problems!

2. Spell checker for Pico

3. How prevent character loss on SIO?

4. FreeBSD NIS server and Solaris 2.6 Clients?

5. Prevent File Access with Files or FilesMatch Directive

6. Problem with TL894

7. how to prevent prevent .so-calling routine to crash from segfaults in .so

8. This is why businesses should avoid windoze/unix/linux ...

9. Mirroring large file systems: Recovery from disk loss

10. How to appen a loss file by use netscape as ftp?

11. sed losses char w/ dos files

12. Microsoft SEC filing shows hideous losses

13. Partial data loss uploading image file