3

I am running a Samba file share on Ubuntu 18.04, and have configured a recycle bin in the samba config file. When I browse to the file share with Windows file explorer, and delete something, it moves into the recycle bin as expected.

The problem occurs when I then want to clear out the recycle bin. If I click into the recycle bin folder, and delete the contents, a recycle bin folder is created within the recycle bin, and the contents are moved there. I can never clear out the recycle bin.

My /etc/samba/smb.conf file is:

[global]
;workgroup = WORKGROUP
server string = File Server
security = user

[public]
  comment = public anonymous access
  path = /srv/
  browsable =yes
  create mask = 0660
  directory mask = 0771
  writable = yes
  guest ok = yes
    #Recycle Bin
    vfs objects = recycle
    recycle:repository = /srv/RecycleBin
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:exclude = *.tmp,*.temp

Is there a way in which samba can permit the contents of the recycle bin to be deleted, without recycling them?

user2165827
  • 31
  • 1
  • 2

1 Answers1

2

You may have found out the solution by yourself already but for everyone else I got it up running by doing the following changes:

old line:

recycle:repository = /srv/RecycleBin

new line:

recycle:repository = RecycleBin

and add:

recycle:excludedir = /RecycleBin,tmp,/temp,/TMP,/TEMP

So your full config would be:

[global]
;workgroup = WORKGROUP
server string = File Server
security = user

[public]
  comment = public anonymous access
  path = /srv/
  browsable =yes
  create mask = 0660
  directory mask = 0771
  writable = yes
  guest ok = yes
    #Recycle Bin
    vfs objects = recycle
    recycle:repository = RecycleBin
    recycle:keeptree = yes
    recycle:versions = yes
    recycle:exclude = *.tmp,*.temp
    recycle:excludedir = /RecycleBin,tmp,/temp,/TMP,/TEMP

Hope this helps =)

sdrwtf
  • 21
  • 2