Recycle Bin (vfs recycle) for SMB Shares


dlandon

Recommended Posts

6 minutes ago, emb531 said:

Since the update on 1/14 Recycle Bin is not working correctly, files are being deleted immediately and not being sent to the Recycle Bin.  I can see the parent folder in the Recycle Bin (Movies) but the actual folder/file that was deleted is not present.  Logging is working correctly and shows the unlinkat commands.  I have restarted the plugin but same issue.

Seems to be working for me.  The only change was with excluding directoies.

 

Post a screen shot of your recycle bin settings.

Link to comment

So, In regards to the newest update for the Recycle Bin. It appears that with the newest update, when the .Recycle.Bin folder is created, it appears the permissions are not set correctly when using the default settings
image.jpeg.0d112fa8d5eae3cea4703fb131c7eb6a.jpeg

image.thumb.jpeg.4f65fc8c637d862b9c90a99f47130753.jpeg

If you do a chmod 777 on the .Recycle.Bin folder, it works properly again. However, I'm used to deleting the folder when doing a cleanup and letting the tool recreate it each time; so this is a workaround for now.

Link to comment
4 minutes ago, BloodRoses75 said:

If you do a chmod 777 on the .Recycle.Bin folder, it works properly again. However, I'm used to deleting the folder when doing a cleanup and letting the tool recreate it each time; so this is a workaround for now.

I just found that bug and it will be fixed in the next release.

  • Like 1
  • Thanks 1
Link to comment
  • 2 weeks later...
On 1/17/2023 at 9:32 PM, emb531 said:

Since the update on 1/14 Recycle Bin is not working correctly, files are being deleted immediately and not being sent to the Recycle Bin.  I can see the parent folder in the Recycle Bin (Movies) but the actual folder/file that was deleted is not present.  Logging is working correctly and shows the unlinkat commands.  I have restarted the plugin but same issue.

I am having a similar problem.  I was using an old version of the plug in from December today, cleaning up old files.  Everything was working fine.

Fix Common Problems kept bugging me with a pop up, and it was because I had several plugins out of date.  Recycle Bin was one of them.  

After the update to the 2/10 version, Recycle Bin doesn't seem to work at all.  No entries are being made in the log file.  If I delete a file (anything from 200 KB to 5 GB I've tried) it is immediately deleted.  I can watch the available space on the drive increase instantly.  Before it didn't increase unless I emptied the bin.

I tried uninstalling and reinstalling, but that did nothing.  Which I wasn't able to reboot between uninstall and reinstall, because I am 8 hours into a 24 hour preclear.  

I will be able to do more tomorrow after that is finished.

But updating from a December build to 2/10 build seems to have completely broken Recycle Bin for me.

Also, I tried deleting the .Recycle.Bin folder in one of my shares and then deleting a file out of it.  It did not recreate the folder.

Edited by KYThrill
Link to comment
3 hours ago, sonofdbn said:

I have the same problem of deleted files not showing up in the Recycle Bin with the 02/10 update. Might have happened with recent versions, but only noticed it now. Had been working fine, although unfortunately I don't know what the last working version was.

 

I am seeing the same issue as the others. After the last update, deleted files are no longer going to the .Recycle.Bin folders. I ran into some permission issues in the past that was fixed by deleting the existing folders and letting them get recreated. That did not work with this newest version.

 

Troubleshooting steps.
Delete (rename) .Recycle.Bin folders on ALL shares
ununstall Recycle Bin plugin
rename /boot/config/plugins/recycle.bin folder
stop array
remove and custom smb parameters
reboot
reinstall recycle.bin plugin (/boot/config/plugins/recycle.bin was recreated and populated with new files)
enable Recycle Bin (with deleted file logging) and start service
test delete a file (.Recycle.Bin folder NOT created and no file delete logged)

 

recycle.bin parameters are added to /etc/samba/smb-shares.conf (and removed if plugin is disabled)

[CABackup]
        path = /mnt/user/CABackup
        comment = Leave this share on the array!
        browseable = yes
        writeable = no
        read list =
        write list = changed
        valid users = changed
        case sensitive = auto
        preserve case = yes
        short preserve case = yes
        recycle:repository = .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 feel like it has something to do with smb, but can't figure it out.

Link to comment
5 hours ago, dlandon said:

I've updated recycle bin to fix this issue, but over the last few days GitHub has been slow in posting the updates, so it may take a while.

I confirm that new version 2023.02.11 seems to work again.

 

Is there a way to recover files deleted while the version 2023.02.10 (the one with the bug) was running on my system ?

Link to comment

Do we need to restart the server version 2023.02.11 to work? Because I deleted some stuff and they are not showing up in the recycle bin. I'm not 100% sure I had upgraded to the latest version before deleting though so it might also be that. I don't have anything to delete right now I can't check.

Edited by Optimbic
Link to comment
  • 2 weeks later...

Hey there,

 

when I copy new files from my Windows PC to my Unraid share, all copied files are beeing copied to the share but also automatically in the .Recycle.Bin folder. However, the files in the Recycle.Bin folder cannot be opened, size is 0 Byte. When I delete the same files in the share, Recycle.Bin creates a new file Copy #1 of 1.JPG which can be opened.

 

I tried deleting and installing the recycle.bin addon and i tried deleting the .Recycle.Bin. folder, same problem.

 

Anyone an idea? 

Thanks
 

Edited by HansOtto
Link to comment
51 minutes ago, HansOtto said:

Hey there,

 

when I copy new files from my Windows PC to my Unraid share, all copied files are beeing copied to the share but also automatically in the .Recycle.Bin folder. However, the files in the Recycle.Bin folder cannot be opened, size is 0 Byte. When I delete the same files in the share, Recycle.Bin creates a new file Copy #1 of 1.JPG which can be opened.

 

I tried deleting and installing the recycle.bin addon and i tried deleting the .Recycle.Bin. folder, same problem.

 

Anyone an idea? 

Thanks
 

Post diagnostics.

Link to comment

i found out that the problem only shows up when copying files from windows and windows asks: "Are you sure you want to copy this file without it's properties?" Looks like windows is making an empty file before asking..

 

If i copy files from other shares or files without properties its not happening.

Link to comment
  • 4 weeks later...

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.