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

I cant see any pic, but you might be navigating up to the parent directory which is /mnt/user, which is the entire contents of your array. The simple fix is don't.

  • Replies 1.3k
  • Views 396.7k
  • 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

The document looks like it is actually in the recycle bin, so at some time the document was deleted with samba.

But that's the thing, it was never deleted (at least by me). Only uploaded once (last night) while I was typing to you originally asking about the changes.

 

To make it even more strange, the receipt still exists where it is supposed to, and is a 332kb file. The reference in the recycle bin is a 0kb file?

 

There are other files here in the settings page that should not exist in the recycle bin, but are there (and have the originals still existing in the array). For example, a photo I uploaded to my Photography share last week, also has a 0kb reference in the recycle bin, however the photo exists in the folder as it should (but also has this rogue 0kb copy in recycle bin).

No. The Recycle Bin plugin is correct.

 

I see this all the time with multiple programs.

 

What they seem to do is initially create a 0 byte file with the original filename. They then write to a new temp file, then delete the place-holder file,  then rename the new temp file to the original filename.

 

This happens exactly like this when downloading .NZB or .Torrent files from WinOS clients via web browser and writing to it from SAMBA. It also happens when Emby does media scans from WinOS clients.

 

It seems to be how WinOS Clients operate when writing to network shares.

Thanks BRit, that sounds like it would be the case. The computers we use in the house are windows computers, and the files could end up on the server via a multitude of different ways. For example, the photo I uploaded was downlaoded through an email in chrome, and when the save explorer popped up, I saved directly to my share. The receipt was also a receipt I had in my email (chrome again), and I "printed" it to *.pdf directly to the array etc etc...

 

So what you are saying is that some programs take 4 x steps to get to the final destination:

 

1. write 0kb file with to-be file name (assume to check for duplicates?)

2. delete the 0kb file

3. write the file in some cryptic .tmp format

4. move the .tmp file to the original to-be name

 

Got it...

 

Thanks guys, I feel more comfortable. Was slightly worried some of my files were ending up in the recycle bin, knowing I have not combed every file prior to purging. Was nervous I may have been losing misc files here and there.

Thanks for the Update! Again, recycle bin is a great thing to have.

Superb update! Thank you.

 

Do we specify excluded shares by name, separated by a comma?

I just installed this plugin for the first time and I get the following error on the Settings page:

Warning: file_get_contents(/boot/config/smb-extra.conf): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php(292) : eval()'d code on line 16

  • Author

I just installed this plugin for the first time and I get the following error on the Settings page:

Warning: file_get_contents(/boot/config/smb-extra.conf): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php(292) : eval()'d code on line 16

 

What version of unraid?

  • 2 weeks later...

I am getting something similar on 6.2.0-beta21

 

Warning: file_get_contents(/boot/config/smb-extra.conf): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php(300) : eval()'d code on line 16

  • Author

Superb update! Thank you.

 

Do we specify excluded shares by name, separated by a comma?

 

Click on 'Help'.

  • Author

I am getting something similar on 6.2.0-beta21

 

Warning: file_get_contents(/boot/config/smb-extra.conf): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php(300) : eval()'d code on line 16

 

I'm not seeing this.

  • 2 weeks later...
  • Author

I am getting something similar on 6.2.0-beta21

 

Warning: file_get_contents(/boot/config/smb-extra.conf): failed to open stream: No such file or directory in /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php(300) : eval()'d code on line 16

 

I'm not seeing this.

 

Found the problem.  Fixed in the latest release.

First of, awesome plugin!  Thanks for taking the time to create and maintain it.

 

The second question is in regards to excluding shares... what is the correct format to use, as it does not seem to be working for me.

 

I've just put in "Movies,TV" but do I need to put the full path? (Help doesn't state the format).

 

Thanks again!

 

~Spritz

  • Author

First of, awesome plugin!  Thanks for taking the time to create and maintain it.

 

The second question is in regards to excluding shares... what is the correct format to use, as it does not seem to be working for me.

 

I've just put in "Movies,TV" but do I need to put the full path? (Help doesn't state the format).

 

Thanks again!

 

~Spritz

 

Only the share names.  Full paths are not needed.

I cannot get this plugin to work.

 

I've attached a screenshot of my configuration, but for some reason no files i remove are inside the .Recycle.Bin folder (it's not even created).

 

The only thing i see is some shortcuts inside /mnt/RecycleBin (but the the shortcuts points to nothing as there are no .Recycle.Bin folders in any of my shares).

 

Screenshot_1.jpg.2173c71a9640459050c6e9d3786552af.jpg

Screenshot_2.jpg.cccde6abec27172e10f8b85a779c5519.jpg

I cannot get this plugin to work.

 

I've attached a screenshot of my configuration, but for some reason no files i remove are inside the .Recycle.Bin folder (it's not even created).

 

The only thing i see is some shortcuts inside /mnt/RecycleBin (but the the shortcuts points to nothing as there are no .Recycle.Bin folders in any of my shares).

How are you removing the files? This is just for files you delete over the network using SMB.

I cannot get this plugin to work.

 

I've attached a screenshot of my configuration, but for some reason no files i remove are inside the .Recycle.Bin folder (it's not even created).

 

The only thing i see is some shortcuts inside /mnt/RecycleBin (but the the shortcuts points to nothing as there are no .Recycle.Bin folders in any of my shares).

How are you removing the files? This is just for files you delete over the network using SMB.

 

Doh! Mostly through SSH (rm command) and FTP. But thanks for the clarification. Is there any way you can have like a recycle bin for rm commands?

Maybe a alias for rm - that instead of just deletes the file, moves it to the recyclebin folder in that share?

 

 

something like (not tested - not very good at bash)

 

 

alias rrm="IFS="/" read -ra PARTS <<< "$(pwd)" ; mv $0 /${PARTS[0]}/${PARTS[1]}/.Recycle.Bin/"

 

rrm would be for recycle delete, leaving rm for perm delete

 

looks like it might have to be made into a bash script and have the rrm alias call the bash script instead

 

Myk

ok, this works

 

 

/boot/scripts/rrm.sh

 

#!/bin/bash

IFS="/" read -ra PARTS <<< "$(pwd)"

mv "$1" "/${PARTS[1]}/${PARTS[2]}/.Recycle.Bin/"

 

 

alias rrm="/boot/scripts/rrm.sh"

 

 

test on junk file to make sure

Myk

  • 1 month later...

I do not have issues at all with this plugin but I see an error message on the system console....probably a cosmetic problem?  :D

error.jpg.52b6a228684a75a254a2e53a3ad95296.jpg

  • 4 weeks later...

Hello everyone,

 

great plugin.

 

Just one question, is there a way to  really hide the .Recycle.Bin folder?

 

The windows recycle bin is a "protected system folder". Not "just" a hidden folder. So, you can see hidden folders, but still not the recycle bin. Which I find great.

 

I don't want to samba share the recycle bin, because it's a simple "safety net" for users, who accidentally delete a file. They should only be restored by the admin or deleted by the cron job.

 

I read that samba can "veto" files. This way these files/folders aren't exported at all. How can I achieve that?

 

Thanks and best regards,

Henryk

  • 1 month later...

I do not have issues at all with this plugin but I see an error message on the system console....probably a cosmetic problem?  :D

Is anyone having any idea? Thanks a lot.

  • Author

I do not have issues at all with this plugin but I see an error message on the system console....probably a cosmetic problem?  :D

Is anyone having any idea? Thanks a lot.

 

Make a change is the Recycle Bin settings and Apply.  The message will go away.

Thanks landon. Initially I was removing the plugin and reinstalled it without success but your guidance went well and resolved the minor issue.

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.