Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

28 minutes ago, trurl said:

In other words, unless you are doing the deletes over the network, they don't go into the Recycle Bin. If you are doing it on the server, either manually or with some app, then Recycle Bin has no way to know about it.

Yes.  The recycle bin is built into samba.

Link to comment
39 minutes ago, trurl said:

In other words, unless you are doing the deletes over the network, they don't go into the Recycle Bin. If you are doing it on the server, either manually or with some app, then Recycle Bin has no way to know about it.

 

Okay more details 

 

Doing the deletes from a separate computer running Windows 7 64 bit and mapping an unRaid share as R:\ with the command line

“net use R: \\storage\recordings /persistent:no”

 

NOT doing the deletes via ssh, telnet or on the server itself

 

I was considering writing a script to generate all the possible three digit character extensions and seeing how many survive

 

Might download D again to do that

 

i have files with 12 different extensions only 10 make it to the recycle bin

 

may be an unRaid problem, may be a samba recycle problem, may be a plug-in problem, may be an old unRaid flash drive needs wiping and starting over problem

 

*.txt and *.bmp are disappearing when deleted over samba from a Windows 64 bit professional computer on said share 

 

have stopped and disabled the recycle bin and deleted the smb-extra.conf file a few times before trying to enable it and configure it again and clicking restart in the plugin a few times

 

some files go to the recycle bin

some dont

only a problem I have seen since upgrading to 6.4.1

but I never looked for it before

 

tried to clarify,

Bobby 

Link to comment
  • 4 weeks later...
On 1/4/2018 at 7:15 PM, Zangief said:

Just to say I exactly did what shazahm1 did to get mine working... including the running samba restart twice..

 

I checked the /etc/samba/smb-shares.conf file  beforehand and the recycle bin entries were in it already

Had to do this as well to get it working as well....

Link to comment
  • 3 weeks later...

EDIT: Ignore me. Thank you, please drive through.

-------

 

I have a question/concern about using Recycle Bin and whether or not it has an impact on delete permissions.

 

Here is my scenario:

- I have a file called test.txt with 600 (rw-------) root:root permissions

- The account I use for SMB (not root) can not read or write test.txt (expected), but it can somehow delete it via SMB!

 

I don't know exactly how the Recycle Bin plugin works on the backend, but the only thing I can think is that it runs as root and is intercepting the SMB delete command and not enforcing permissions.  

 

Please let me know if this is accurate and/or expected behavior, or if I just have something stranger going on.  Thanks!

Edited by ksarnelli
Link to comment
12 minutes ago, remotevisitor said:

In Linux the permissions to delete a file depends on the write permission of the folder that contains the file and execute permissions on all parent folders not the file permissions/owner.

 

Thanks!  I thought the file also need to have the write bit set. I'm an idiot.

Link to comment
  • 1 month later...

Recycle bin doesn't seem to be working for me anymore.  I accidentally deleted a directory instead of a single file (from Win10 machine on share).  I went to the recycle bin folder to get it back but it was empty.  I checked the unraid gui and updated the plugin to the latest version and deleted another file but the bin is still empty.  Uninstalled and reinstalled the plugin, deleted a test file, the bin is still empty.  No on Unraid 6.4.1 with RecycleBin Plugin at 2018-03-21

 

Any suggestions?

 

If I click on the Recycle Bin icon on the Installed Plugins page, the gui tries to show http://tower/Settings/RecycleBin but nothing comes on the screen. It just shows that its loading something that never loads.

 

I just scanned back to the previous page and see these symptoms have been discussed before.  mythtv is currently recording so once its done I'll try restarting samba and/or the array as mentioned, then I'll update this post.

 

Edit: 05/11 - Tried the command suggestions, restarting samba. this didn't work. Restarting the server got hung on "Stopping Services" so now I'm deep into trying to figure out what else is wrong.

Edited by Everend
Link to comment
  • 5 weeks later...
On 5/7/2018 at 8:31 PM, Everend said:

Recycle bin doesn't seem to be working for me anymore.  I accidentally deleted a directory instead of a single file (from Win10 machine on share).  I went to the recycle bin folder to get it back but it was empty.  I checked the unraid gui and updated the plugin to the latest version and deleted another file but the bin is still empty.  Uninstalled and reinstalled the plugin, deleted a test file, the bin is still empty.  No on Unraid 6.4.1 with RecycleBin Plugin at 2018-03-21

 

Any suggestions?

 

If I click on the Recycle Bin icon on the Installed Plugins page, the gui tries to show http://tower/Settings/RecycleBin but nothing comes on the screen. It just shows that its loading something that never loads.

 

I just scanned back to the previous page and see these symptoms have been discussed before.  mythtv is currently recording so once its done I'll try restarting samba and/or the array as mentioned, then I'll update this post.

 

Edit: 05/11 - Tried the command suggestions, restarting samba. this didn't work. Restarting the server got hung on "Stopping Services" so now I'm deep into trying to figure out what else is wrong.

Yay I’m not losing my mind. Mine is doing the same thing on 6.5.2

Link to comment

I dont get any error msgs in my logs, this is what is in my smb-extra.conf, let me know what else will help

 

 

#vfs_recycle_start
#Recycle bin configuration
[global]
   syslog only = No
   log level = 0 vfs:0
#vfs_recycle_end

 

include = /boot/scripts/RootShare.conf
include = /etc/samba/unassigned-shares/Crucial_CT240M500SSD1_1332095464B2.conf

settings.png

Link to comment
24 minutes ago, MyKroFt said:

I dont get any error msgs in my logs, this is what is in my smb-extra.conf, let me know what else will help

 

 

#vfs_recycle_start
#Recycle bin configuration
[global]
   syslog only = No
   log level = 0 vfs:0
#vfs_recycle_end

 

include = /boot/scripts/RootShare.conf
include = /etc/samba/unassigned-shares/Crucial_CT240M500SSD1_1332095464B2.conf

settings.png

What is the problem you are having?

Link to comment
17 hours ago, dlandon said:

Instead of just complaining about it, how about posting some diagnostics so we might be able to help figure out what is going on.

Figured it out 900K entries that needed to be deleted from Recycle bin manually due to a rouge creation of Squid maleware bait files must’ve crashed it. Once I cleared them the plugin started working again. Must’ve been too much scrub for the plugin. 

Link to comment
10 hours ago, MyKroFt said:

Deleted files do not go to the recyclebin when deleted from share via windows laptop

 

found the below in /mnt dir?

0 space taken up

 

foundthis.PNG

Looks to me like they are.  That's what the .Recycle.Bin directories are.

 

Post a diagnostics for more help.

Link to comment
  • 1 month later...

This plugin also doesn't work for me. Installed it, started it. Deleted a few files from a share on a windows PC over the network and there is no .Recycle.Bin folder created in the share.

 

Any idea how to start diagnosing this? unRAID 6.5.3

Edited by jj_uk
Link to comment
5 hours ago, jj_uk said:

This plugin also doesn't work for me. Installed it, started it. Deleted a few files from a share on a windows PC over the network and there is no .Recycle.Bin folder created in the share.

 

Any idea how to start diagnosing this? unRAID 6.5.3

 

And you are sure you don't have SMB Settings to Hide "dot" files?

Link to comment

Hello

 

i Just installed this plugin and im having trouble getting it working. 

 

it says it is running, but when i create and then delete files in windows on a share nothing happens. In the Unraid GUI it still says the Recycle Bin is empty and there are no hidden folders i can find.

 

Any ideas where i should start?

 

im running 6.5.3

Link to comment
  • 1 month later...

I just realized that its only partially working on 6.5.3 for me.  I have one share with a recycle bin directory but none of my others have one even though I just deleted directories off of them.  The plugin screen is only showing the user share with the directory present.  All files/directories were deleted via a windows box, the ones in the missing share was done through explorer by hitting Delete the ones in the other share which is present were deleted via a program that cuts commercials out of shows then is set to delete the original source when finished.

Link to comment

I finally deleted it as I could not get it to work anymore.  I even removed it, made sure the smb-extra.conf had its config removed, rebooted, reinstalled, enabled, deleted some test files via windows share on desktop and they never show up.  No errors listed in the log file

 

only thing there is

Sep 9 23:45:25 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/recycle.bin-2018.03.21.tgz - downloading from URL https://github.com/dlandon/recycle.bin/raw/master/recycle.bin-2018.03.21.tgz
Sep 9 23:45:26 Tower root: plugin: checking: /boot/config/plugins/recycle.bin/recycle.bin-2018.03.21.tgz - MD5
Sep 9 23:45:26 Tower root: plugin: running: anonymous
Sep 9 23:45:26 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/recycle.bin.cfg - from INLINE content
Sep 9 23:45:26 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/config/smb-extra.conf - from INLINE content
Sep 9 23:45:26 Tower root: plugin: running: anonymous
Sep 9 23:45:26 Tower root: plugin: creating: /tmp/recycle.bin/stop_recycle.bin - from INLINE content
Sep 9 23:45:26 Tower root: plugin: setting: /tmp/recycle.bin/stop_recycle.bin - mode to 0770
Sep 9 23:46:11 Tower ool www[15674]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'update'
Sep 9 23:46:11 Tower Recycle Bin: Stopping Recycle Bin
Sep 9 23:46:11 Tower Recycle Bin: Recycle Bin is not running
Sep 9 23:46:11 Tower Recycle Bin: Starting Recycle Bin

:(

 

Link to comment
7 hours ago, Ryland said:

I just realized that its only partially working on 6.5.3 for me.  I have one share with a recycle bin directory but none of my others have one even though I just deleted directories off of them.  The plugin screen is only showing the user share with the directory present.  All files/directories were deleted via a windows box, the ones in the missing share was done through explorer by hitting Delete the ones in the other share which is present were deleted via a program that cuts commercials out of shows then is set to delete the original source when finished.

Working fine for me.  Look at the deleted files log and see if they show up there.

 

I can offer assistance if you post your diagnostics.

Link to comment
4 hours ago, MyKroFt said:

I finally deleted it as I could not get it to work anymore.  I even removed it, made sure the smb-extra.conf had its config removed, rebooted, reinstalled, enabled, deleted some test files via windows share on desktop and they never show up.  No errors listed in the log file

 

only thing there is


Sep 9 23:45:25 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/recycle.bin-2018.03.21.tgz - downloading from URL https://github.com/dlandon/recycle.bin/raw/master/recycle.bin-2018.03.21.tgz
Sep 9 23:45:26 Tower root: plugin: checking: /boot/config/plugins/recycle.bin/recycle.bin-2018.03.21.tgz - MD5
Sep 9 23:45:26 Tower root: plugin: running: anonymous
Sep 9 23:45:26 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/recycle.bin.cfg - from INLINE content
Sep 9 23:45:26 Tower root: plugin: creating: /boot/config/plugins/recycle.bin/config/smb-extra.conf - from INLINE content
Sep 9 23:45:26 Tower root: plugin: running: anonymous
Sep 9 23:45:26 Tower root: plugin: creating: /tmp/recycle.bin/stop_recycle.bin - from INLINE content
Sep 9 23:45:26 Tower root: plugin: setting: /tmp/recycle.bin/stop_recycle.bin - mode to 0770
Sep 9 23:46:11 Tower ool www[15674]: /usr/local/emhttp/plugins/recycle.bin/scripts/rc.recycle.bin 'update'
Sep 9 23:46:11 Tower Recycle Bin: Stopping Recycle Bin
Sep 9 23:46:11 Tower Recycle Bin: Recycle Bin is not running
Sep 9 23:46:11 Tower Recycle Bin: Starting Recycle Bin

:(

 

I'm not sure what value this post has.  Are you just whining, or would you genuinely like some help?  If you want some help, look at the deleted files log to see if the files show up there, and post your diagnostics.

  • Upvote 1
Link to comment

I just installed this for the first time as I just lost a bunch of files from an accidental delete, figure this would solve that in the future. I am on 6.3.5 and I can't get it to work. It is enabled and show . files is on. After deleting test files the recycle bin says empty still.

 

Not sure what logs need posting to help.

 

Well it just kinda worked, deleted 5 files and only 2 showed up in the recycle folder.

Edited by Mopar_Mudder
Link to comment
6 hours ago, Mopar_Mudder said:

 

Well it just kinda worked, deleted 5 files and only 2 showed up in the recycle folder.

 

I mentioned something a few months back about certain file extensions just disappearing on deletion and not being recycled. 

 

I was considering writing a script to generate all three letter file extensions and see how many got recycled ... but then I realized unRaid isn’t running on dos 3.0. 

Link to comment
  • dlandon changed the title to Recycle Bin (vfs recycle) for SMB Shares

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.