KB450291 – Adding Recycle Bin to SMB Shares through Houston UI

Last modified: May 18, 2021
You are here:
Estimated reading time: 1 min

KB045288 – Adding Recycle Bin to SMB Shares through Houston UI


  • In this article we’ll go over the steps to add a Recycle Bin for deleted files/folders through Houston UI


  • Houston UI
  • SMB share


  • First, we’ll need to access the configuration of our SMB share/dataset through the UI

  • Once we’re in the Configure Samba Share menu, we add these options:
vfs objects = recycle
recycle:repository = .recycle
recycle:keeptree = yes
recycle:versions = yes

  • Next, we have to add a cron task to automatically delete files from the recycle folder, otherwise we can’t actually free any space on the server. We do this first by entering:
root@ubuntu-45drives-bailey:~# crontab -e

  • Next, we add the command that will automatically delete any items older than 7 days:
0 0 * * *       find /tank/*/.recycle/* -atime +7 -delete

Note that the path is setup as “/pool/sharelocation/recyclefolder/recyclefoldercontents”

  • Then we can save the cronfile, and verify with:
root@ubuntu-45drives-bailey:~# crontab -l

  • Finally, we have to restart the SMB service. We do this with:
root@ubuntu-45drives-bailey:~# systemctl restart smbd
root@centos7-45drives-bailey: systemctl restart smb


  • If we’re to go onto our SMB share, and delete a folder with contents/a file, we can then navigate to the hidden recycle folder to see that it got moved over to there, instead of deleted entirely:


  • If the folder does not show up in the recycling bin, ensure that the SMB service was restarted
  • If you simply delete an empty folder, it will not get moved into the recycling bin, there must be subfolders or files within the folder
Was this article helpful?
Dislike 0
Views: 115
Unboxing Racking Storage Drives Cable Setup Power UPS Sizing Remote Access