Results 1 to 5 of 5

Thread: samba recycle bin

  1. #1
    Join Date
    Jun 2009
    Location
    Durban North
    Posts
    17

    Default samba recycle bin

    hi guys i just wanted to know if its possible and how to setup a recycle bin for the samba shared folder,for example if a samba user deletes a file on the shared folder it must go into the recycle bin instead of just getting completely deleted,thanks guys

  2. #2
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: samba recycle bin

    Create a folder for trash in the share. It can have any (reasonable) name. It can be hidden or not hidden. e.g. I'll use .rubbishbin for the name here.

    Add these lines into the configuration stanza for the share in the Samba config file (smb.conf):
    vfs object = recycle
    recycle:repository = .rubbishbin
    recycle:keeptree = yes
    recycle:exclude = *.tmp, *~, *.bak
    Notes:
    • files defined in recycle:exclude will not make it to the rubbishbin
    • if you don't create .rubbishbin it will autocreate when you delete stuff
    • recycle:keeptree will maintain the directory tree (relative to the shared directory)
    • the last three lines are optional
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  3. #3
    Join Date
    Jun 2009
    Location
    Durban North
    Posts
    17

    Default Re: samba recycle bin

    thanks swerdna,i did try it but for some reason it does not work,this is how i have done it in my smb.conf


    vfs objects = recycle
    recycle:keeptree = True
    recycle:versions = True
    recycle:touch = False
    recycle:maxsize = 0
    recycle:repository = .recycle/%u

  4. #4
    Join Date
    Mar 2008
    Location
    Oz
    Posts
    11,731
    Blog Entries
    2

    Default Re: samba recycle bin

    Can't help much here. Try no and yes instead of true/false. And I don't know the option "version" (but then I have only used this in the form I showed here). And I find the maxsize ambiguous; to me it means the opposite of what it means to you; to me it means that if 0 then delete everything exceptn files with 0 bytes. If you mean -- keep everything, the man page says to make the maxsize -1, or common sense says maybe don't mention it and everything will be backed up.
    Last edited by swerdna; 27-Aug-2009 at 02:27.
    Leap 42.3 & 15.1 &KDE
    FYIs from the days of yore

  5. #5
    Join Date
    Jun 2009
    Location
    Durban North
    Posts
    17

    Default Re: samba recycle bin

    thanks swerdna,i got it to work on a share that i create of the root directory,the previous i was trying was in the home folder,it doesnt seem to work in the home folder no matter what i do,thanks again for your help

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •