# samba recycle problem

## asiobob

I'm testing out various samba configurations which will hopefully soon serve as a medium sized domain controller.

The users *may* accidently delete files, and samba has a recycle VFS module that basically moves it to a specified directory RELATIVE to the share.

I have the code below inside the [homes] share in smb.conf

```

vfs object = recycle

 recycle:repository = .salvage

 recycle:keeptree = Yes

 recycle:touch = Yes 

 recycle:versions = Yes 

# recycle:maxsixe = 0

 recycle:exclude = *.tmp 

 recycle:exclude_dir = /tmp 

 recycle:noversions = *.doc

```

Now it works in general, delete files are moved to the .salvage folder, but what doesn't happen (or I'm misunderstanding this) is the file is not "touched", (see the touch = yes option is enabled).

So when a file is deleted in windows on the home drive, the file is moved to the .salvage directory, but it retains the original timestamp. If I'm not mistaken I believe the touch option "touches" the file in the unix sense so the time stamp when you to a ls -al shows the time it was delete, not the original times. Assuming this is the case, then I could create a script that delets files that are X days old...

Anyone have ideas why the timestamp remains the origianl of the file, not to the time it was "deleted" ? 

Info:

Filesystem on server is reiserfs 3.6

File has quota's enabled and working

----------

## adaptr

Yes, and you have noatime set on it ?

That would explain it, then - it can't be touched  :Wink: 

EDIT oh wait - silly me.

touch changes the mtime, not the atime.

sorry, never mind..

----------

## asiobob

I don't have access to the box atm and I can't recall the fstab parameters. But I can manually touch the files using touch command.

Any other suggetions?

----------

## asiobob

bump

----------

