Recycle bin for Noobs

230 views
Skip to first unread message

Ferrari

unread,
May 6, 2018, 3:18:41 PM5/6/18
to al...@googlegroups.com
I've just configured it on my NAS with help of information available on following post:
https://groups.google.com/forum/#!searchin/alt-f/recycle$20bin|sort:date/alt-f/2t08pou20HE/JWsQZlafCwAJ
And as the information there is poorly structured I'm making this short "guide"

In order to activate the recycle bin you must:
1) Install "samba-modules" and "samba-doc" packages (thru Alt-F - found under packages)
2) Still under Alt-F, go Services > Network and click Configure button for smb (Samba Server)
3) Click on Advanced and enter root and it's password
4) Click on "Shares", click advanced on "Change View To", select the share on the list and click on "choose share"
5) Go to "vfs objects" (under "VFS module options") and type "recycle" on the box then click on "commit changes" (on top of page)
6) Save settings
7) connect via ssh (using PuTTY*) and type: vi /etc/samba/smb.conf
8) Now under Vi (it's an editor), type "i" to enter insert mode, find "vfs objects = recycle" and add under it following lines**:
recycle:keeptree=yes
recycle:versions=yes
9) Press Esc to leave insert mode then ZZ or :wq (to save and quit)
10) Possibly stop/start smb for changes to take effect (on Alt-F > Services or using the "rcsmb reload" or "rcsmb restart" commands via ssh)
11) Delete something (if you don't the folder won't be created)
Done! Now you have a hidden folder called ".recycle" inside the root of your share

*Putty can be found here: https://www.chiark.greenend.org.uk/~sgtatham/putty/
**To understand what they do and more options see: https://www.samba.org/samba/docs/current/man-html/vfs_recycle.8.html

Yes, you can skip 2 to 6 and simply add "vfs objects = recycle" line thru Vi too, but as a noob guide I'm leaving them there so you get to know samba interface better and have a reference where to add the lines.

If under Firefox you get SEC_ERROR_UNKNOWN_ISSUER when trying to access advanced samba:
1- Go to Options > Advanced > Certificates and click on View
2- On Servers tab you click on Add exception, then type the location the message was showing (ex: NASNAME:902) and click get certificate
3- It'll fail and allow you to click on "Permently store" and then "confirm security exception"

Marcio de Moura Silva

unread,
Apr 30, 2020, 10:49:12 AM4/30/20
to Alt-F
Hello Ferrari, thank you very much for your contribution, I managed to succeed.

I have a difficulty to be overcome.

I have 4 folders that I have to share.

However, what I discovered (and I may be wrong) is that I need to create a recycle bin for each of these folders, since a recycle bin in mnt only works if I operate inside it, that is, delete files there.

I did the test and created a recycle bin on those shares and, voilá, it worked.

I ask:

1- Is that so?

2- Is there a way to create a "universal" recycle bin?

Best regards,

Marcio de Moura

Ferrari

unread,
May 3, 2020, 10:01:06 AM5/3/20
to Alt-F
Yeah, it's not possible to create a universal recycle bin (at least that I'm aware of), you'll have one bin for each root of each share.

But you could make an script to empty those folders or use a program like Disk Cleaner (https://portableapps.com/apps/utilities/disk_cleaner_portable)

For Disk Cleaner for example you'd create a "MyNAS.dct" inside "plug-ins" folder with something like:
[info]
Title=MyNAS
Description=Empty specified NAS Recycle Bins

[files]
\\MyNAS\Share_1\.recycle\* /s
\\MyNAS\Share_2\.recycle\* /s
\\MyNAS\Share_3\.recycle\* /s
\\MyNAS\Share_4\.recycle\* /s

Maybe create a Windows Library? In my case, I have only 2 bins and delete them manually, so I haven't done this myself.

Sarmad Al-Mashta

unread,
Jun 14, 2020, 12:25:25 AM6/14/20
to al...@googlegroups.com
Thank you ... finally after so many years with ALT-F I have a recycling bin

Vincent Zag

unread,
Apr 6, 2024, 10:09:28 AMApr 6
to Alt-F
6 years later, this tutorial is still helpful !

Thanks :)
Reply all
Reply to author
Forward
0 new messages