Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Recycle Bin (vfs recycle) for SMB Shares

Featured Replies

2 minutes ago, dlandon said:

 

Echo "" > \\tower\share\.Recycle.Bin\placeholder.txt

Ok. Thanks.

Where would I need to store the placeholder.txt file for this to work?

  • Replies 1.3k
  • Views 396.5k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • Shares were not displaying when "Log Deleted Files" was set to "No".  This has been fixed in the latest version.

  • dlandon
    dlandon

    Done.   The file directory in the recycle bin is created when the file is deleted so it will show the date/time when the file(s) were deleted, but the modify date/time on the files will rema

  • The excluded files input field in the settings is now 150 characters.

Posted Images

  • Author
15 minutes ago, wgstarks said:

Ok. Thanks.

Where would I need to store the placeholder.txt file for this to work?

 

That command will do what you need.  It creates the file in the recycle bin.  The command puts an empty string into a newly created file in the .Recycle.Bin folder.

Edited by dlandon

1 minute ago, dlandon said:

 

Tthat command will do what you need.  It creates the file in the recycle bin.  The command puts an empty string into a newly created file in the .Recycle.Bin folder.

Ok. Not a copy at all. Thanks.

1 hour ago, dlandon said:

 

Echo "" > /mnt/user/share/.Recycle.Bin/placeholder.txt

Worked great, thanks again.

  • 3 weeks later...

Does anyone else have the $RECYCLE.BIN folder not hidden on Windows 10?

Is there a way i can hide this?

  • Author
2 hours ago, showstopper said:

Does anyone else have the $RECYCLE.BIN folder not hidden on Windows 10?

Is there a way i can hide this?

That has nothing to do with this plugin.  That's a Windows 10 issue.

That has nothing to do with this plugin.  That's a Windows 10 issue.
I wasn't suggestinv that it was a plugin issue. I was trying to find a way to hide it.

Sent from my SM-G925F using Tapatalk

Have a look under view in explorer and check or uncheck the hidden files should solve it.

2 hours ago, Lacehim said:

Have a look under view in explorer and check or uncheck the hidden files should solve it.

 

Windows is set to not show hidden folders. It looks to me that it is not hidden as it is not called .Recycle.Bin. The $ in windows is to hide a share but it isnt a share.

Edited by showstopper

Not sure if this is expected/known, but just wanted to say... I stopped my unRAID array and while I had it down I figured I'd poke through settings on everything in the web GUI to see if there was anything I wanted to change that I couldn't normally do while the array was up. I tried to open the settings for Recycle Bin and it completely hung up my browser (latest Chrome) tab. I tried reloading the browser just back to my main unRAID webpage, but did not work either. After 10-15 minutes I logged into my server via SSH and poked around the processes. I found the php process trying to open Recycle Bin settings and tried to kill <PID> it, but browser tab was still hung up. The proc stayed around as [defunct] so I found the parent process was the emhttp background process. Killed and and then restarted that with "&" cmd and was able to access the web GUI again. Restarted the whole server from there just to be safe.

 

So FYI, maybe you know this or maybe my system was just acting up, but might need to add check not to do something that causes that hang if the array is down when a user opens RB settings so it doesn't crap out.

Edited by deusxanime

  • Author
2 hours ago, deusxanime said:

Not sure if this is expected/known, but just wanted to say... I stopped my unRAID array and while I had it down I figured I'd poke through settings on everything in the web GUI to see if there was anything I wanted to change that I couldn't normally do while the array was up. I tried to open the settings for Recycle Bin and it completely hung up my browser (latest Chrome) tab. I tried reloading the browser just back to my main unRAID webpage, but did not work either. After 10-15 minutes I logged into my server via SSH and poked around the processes. I found the php process trying to open Recycle Bin settings and tried to kill <PID> it, but browser tab was still hung up. The proc stayed around as [defunct] so I found the parent process was the emhttp background process. Killed and and then restarted that with "&" cmd and was able to access the web GUI again. Restarted the whole server from there just to be safe.

 

So FYI, maybe you know this or maybe my system was just acting up, but might need to add check not to do something that causes that hang if the array is down when a user opens RB settings so it doesn't crap out.

This is what you get when the array is stopped:

59ccbbc9eb987_RecycleBinArrayStopped.png.d9188eb0bdd4aefe6b13671b986ca255.png

 

Looks like something in particular with your system.

4 hours ago, dlandon said:

This is what you get when the array is stopped:

59ccbbc9eb987_RecycleBinArrayStopped.png.d9188eb0bdd4aefe6b13671b986ca255.png

 

Looks like something in particular with your system.

 

OK, good to know. It was probably something with my particular system then. I would have been surprised if something like that slipped through this long, but wanted to be put it out there just in case. Thanks!

  • 2 weeks later...

How to make this work? I copy a PDF to a share and delete it on Win 10 but .Recycle.Bin does not show up.

I am on 6.3.5.

capture.thumb.PNG.98369a9ee1bfe9f48cc5d4b2f3917b89.PNG

  • Author
16 minutes ago, joshuaavalon said:

How to make this work? I copy a PDF to a share and delete it on Win 10 but .Recycle.Bin does not show up.

I am on 6.3.5.

capture.thumb.PNG.98369a9ee1bfe9f48cc5d4b2f3917b89.PNG

Try to restart the recycle bin.  Turn on the "Log Deleted FIles?" and see if the file is logged.

 

What is the share?

3 minutes ago, dlandon said:

Try to restart the recycle bin.  Turn on the "Log Deleted FIles?" and see if the file is logged.

 

What is the share?


It does not work. and it logged nothing.

I have a /temp share which is a network mount (V:) through smb on  win 10. I copy the file and delete it through win 10 file explorer.

  • Author
10 hours ago, joshuaavalon said:


It does not work. and it logged nothing.

I have a /temp share which is a network mount (V:) through smb on  win 10. I copy the file and delete it through win 10 file explorer.

Go to a command line and execute this:

/usr/local/sbin/samba restart

See if it works then.

On 10/6/2017 at 8:47 PM, joshuaavalon said:


It does not work. and it logged nothing.

I have a /temp share which is a network mount (V:) through smb on  win 10. I copy the file and delete it through win 10 file explorer.

 

Same for me.

 

Ran the restart command bunch of times too.  Running 6.4.0-rc9f probably why?

/usr/local/sbin/samba restart
  • Author

The recycle bin works only on unRAID SMB shares.  Show a screen shot of your unRAID shares and tell me which one doesn't seem to work.

Here's a screenshot of one of my shares.  There's no .Recycle.Bin folders in any share.  Deleting files don't show in that log.  I'm probably just doing it wrong but can't find anything on how to troubleshoot it.

Untitled.jpg

Untitled2.jpg

  • Author

I'd like to see the file /etc/samba/smb-shares.conf.  It contains the names of all your shares.  If you are comfortable with posting that in this thread, then please do.  If not then PM the file directly to me.

Contains of /etc/samba/smb-shares.conf below.  The plugin has done something because there's a new folder in the /tmp called recycle.bin with a script in it called stop_recycle.bin.  Still no .Recycle.Bin folders, logs, etc.

 

cat /etc/samba/smb-shares.conf
[flash]
        path = /boot
        comment = unRAID Server OS boot device
        browseable = yes
        # Public
        public = yes
        writeable = yes
        vfs objects =
        map archive = no
        map system = no
        map hidden = no
        map readonly = yes
        create mask = 0777
        directory mask = 0777
[dockerappdata]
        path = /mnt/user/dockerappdata
        comment =
        browseable = yes
        # Secure
        public = yes
        writeable = no
        write list = XXXXXX
        vfs objects =
[kidshare]
        path = /mnt/user/kidshare
        comment =
        browseable = yes
        # Public
        public = yes
        writeable = yes
        vfs objects =
[networkdrive]
        path = /mnt/user/networkdrive
        comment =
        browseable = yes
        # Secure
        public = yes
        writeable = no
        write list = XXXXXX
        vfs objects =

  • Author

That file should contain entries like this:

	recycle:repository = %P/.Recycle.Bin/
	recycle:directory_mode = 0777
	recycle:keeptree = Yes
	recycle:touch = Yes
	recycle:touch_mtime = No
	recycle:minsize = 1
	recycle:versions = Yes
	recycle:exclude = *.tmp,*.ign,*.db-*
	recycle:exclude_dir = .Recycle.Bin

for all enabled shares.

 

At the command line execute this:

/usr/local/emhttp/plugins/recycle.bin/scripts/configure_recycle_bin

and let me know if there are any errors.

Progress! No errors after running that command.  Now my /etc/samba/smb-shares.conf shows recycle bin info below.  The rest still didn't work until I ran "/usr/local/sbin/samba restart" twice. 

Thanks for the help.

 

[flash]
        path = /boot
        comment = unRAID Server OS boot device
        browseable = yes
        public = yes
        writeable = yes
        vfs objects = extd_audit recycle
        map archive = no
        map system = no
        map hidden = no
        map readonly = yes
        create mask = 0777
        directory mask = 0777
        recycle:repository = %P/.Recycle.Bin/
        recycle:directory_mode = 0777
        recycle:keeptree = Yes
        recycle:touch = Yes
        recycle:touch_mtime = No
        recycle:minsize = 1
        recycle:versions = Yes
        recycle:exclude = *.tmp
        recycle:exclude_dir = .Recycle.Bin
 

  • Author
43 minutes ago, dee31797 said:

Progress! No errors after running that command.  Now my /etc/samba/smb-shares.conf shows recycle bin info below.  The rest still didn't work until I ran "/usr/local/sbin/samba restart" twice. 

Thanks for the help.

 

[flash]
        path = /boot
        comment = unRAID Server OS boot device
        browseable = yes
        public = yes
        writeable = yes
        vfs objects = extd_audit recycle
        map archive = no
        map system = no
        map hidden = no
        map readonly = yes
        create mask = 0777
        directory mask = 0777
        recycle:repository = %P/.Recycle.Bin/
        recycle:directory_mode = 0777
        recycle:keeptree = Yes
        recycle:touch = Yes
        recycle:touch_mtime = No
        recycle:minsize = 1
        recycle:versions = Yes
        recycle:exclude = *.tmp
        recycle:exclude_dir = .Recycle.Bin
 

I appreciate that you are excited to have it solved for you, but that is not a good solution having to do things manually.  You should not have to initiate the recycle bin script to get the recycle bin to work.  You also shouldn't need to run the samba restart.

 

The script you ran is a recycle bin plugin event script that is run at about a 1 minute interval by unRAID.  The purpose of the script is to add the recycle bin configuration to the shares based on the settings in the recycle bin configuration.  The good news is that the script did not error out.  The bad news is why it is not running as it should.

 

Which version of unRAID are you running?

running 6.4.0-rc9f

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.