CS01-HS Posted December 28, 2020 Share Posted December 28, 2020 (edited) 18 hours ago, NasOnABudget said: This is really disappointing to me, as I consider protecting me from myself a really important feature of a nas. This protects you in a way deeper than a backup can. Couldn't you run a user script every X minutes to chown the files to root and remove write permission from everyone else? I haven't tested that (or the command below) but something like: find '/mnt/RecycleBin/User Shares' -type f -follow -exec chown root:root {} \; -exec chmod ag-w {} \; Or use inotify if you want to get fancy. Edited December 28, 2020 by CS01-HS pre-coffee Quote Link to comment
NasOnABudget Posted December 30, 2020 Share Posted December 30, 2020 On 12/28/2020 at 8:55 AM, CS01-HS said: Couldn't you run a user script every X minutes to chown the files to root and remove write permission from everyone else? I haven't tested that (or the command below) but something like: find '/mnt/RecycleBin/User Shares' -type f -follow -exec chown root:root {} \; -exec chmod ag-w {} \; Or use inotify if you want to get fancy. That sounds like it could work, but sounds fiddly to what Im thinking where Ill have a vm with a share.... to a folder in the share. This way the deleted files just wont be there for the end user (me) or I can set it up as read only, and wont have to rely on a script. The worry with that script is Im not sure how the permissions work or if that would break through unraid changing. Quote Link to comment
odje Posted January 2, 2021 Share Posted January 2, 2021 I've just made a new Unraid Server, fresh install and I noticed this error during install of recycle bin plug in. Any help on resolving this issue would be greatly appreciated. root: Warning: file_put_contents(/boot/config/plugins/recycle.bin/config/smb-extra.conf): failed to open stream: No such file or directory in Standard input code on line 7 Quote Link to comment
NY152 Posted January 12, 2021 Share Posted January 12, 2021 Hello, I have walked through a little thread regarding accessing the recycle bin! It would be good to offer an option that automatically makes the trash folder and its contents completely inaccessible to the logged in user. Why ? For security purposes ! Imagine that the user is the victim of a virus or ransonware, the files in the recycle bin could save hours of work ^^ This is why the configuration of the recycle bin must be able to be configured (a bit like on Synology's DSM in short) Quote Link to comment
cammelspit Posted January 16, 2021 Share Posted January 16, 2021 (edited) Hello, I have been using this plugin for some time but it seems I have run into a massive issue. Emptying the recycle big deleted the files, but somehow my disk space is not recovered. In Krusader and QDirStat the files are gone but for some reason unraid has not given me my disk space back at all yet and I need some help figuring this out. if I cant get this disk space back then I will have to wipe my cache drive and start over from a backup which is unacceptably terrible of a thought. Any idea why this is happening? I just tested it with 6GB of files and now that space is totally gone and not usable. any idea where I can start? UPDATE: Sorry, please disregard. No only was I mistaken about this plugin not working anymore, I ALSO was able to track down where my extra space was going and it was 100% totally unrelated. There were just multiple coincidences right in a row that made it impossible for me to know any different and led me to an inaccurate assumption. Thanks for the plugin, I love it and will continue to use it regularly! 👍 Edited January 16, 2021 by cammelspit Update Quote Link to comment
007craft Posted February 10, 2021 Share Posted February 10, 2021 (edited) I have installed this plugin but it does not add a .recycle bin to any of my Unraid shares. It only adds it to my Unassigned drive share (Which I also want). Is there something I need to configure? See screenshot below on how my "files share" (Which is on the array) does not get a .recycle.bin when my "NVME" share (Which is on an unassigned drive) does. Ive also tested deleting a file from the array and it does not appear goto this recycle bin plugin. Edited February 10, 2021 by 007craft Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 7 hours ago, 007craft said: I have installed this plugin but it does not add a .recycle bin to any of my Unraid shares. It only adds it to my Unassigned drive share (Which I also want). Is there something I need to configure? See screenshot below on how my "files share" (Which is on the array) does not get a .recycle.bin when my "NVME" share (Which is on an unassigned drive) does. Ive also tested deleting a file from the array and it does not appear goto this recycle bin plugin. The recycle bin is only for SMB shares. You are deleting the files through a SMB share? Quote Link to comment
007craft Posted February 10, 2021 Share Posted February 10, 2021 (edited) 8 hours ago, dlandon said: The recycle bin is only for SMB shares. You are deleting the files through a SMB share? I'm deleting files from my windows machine. So yes SMB share. In this particular case its the "files" smb share. Located at \\unraid\files (which is actually /mnt/user/files on the unraod machine. Here's a picture of the smb extra settings if it helps. Im not sure if this plugin has an intent to add anything extra to it? Edited February 10, 2021 by 007craft Quote Link to comment
NY152 Posted February 10, 2021 Share Posted February 10, 2021 Hello, would it be possible to have an option to restrict access to the recycle bin to administrators only (or to selected users)? Quote Link to comment
007craft Posted February 10, 2021 Share Posted February 10, 2021 (edited) On 1/2/2021 at 5:12 AM, odje said: I've just made a new Unraid Server, fresh install and I noticed this error during install of recycle bin plug in. Any help on resolving this issue would be greatly appreciated. After trying to troubleshoot my Issue with recycle bin not working on non unassigned drives I reinstalled the plkugin but this time payed attention to the process. I get this exact same error. Looks like the plugin is failing to update the contents of the sbm-extra.conf file, thus it wont work with any unraid Samba shares. So looks like the plugin is currently broken. Can somebody advise a fix? If I turn on file deletion logging, that will even detect files being deleted from share, yet still no share or recycle object shows up (see screenshot) Quote root: Warning: file_put_contents(/boot/config/plugins/recycle.bin/config/smb-extra.conf): failed to open stream: No such file or directory in Standard input code on line 7 Edited February 10, 2021 by 007craft Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 4 hours ago, 007craft said: Here's a picture of the smb extra settings if it helps. Im not sure if this plugin has an intent to add anything extra to it? It looks like you have manually changed some things in the smb extra file. Yes, the recycle bin makes some changes to the smb extra file. Please remove the lines from [rootshare] on, then remove and re-install the recycle bin plugin. The line 'vfs objects=' is probably removing the vfs recycle bin. Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 4 hours ago, NY152 said: Hello, would it be possible to have an option to restrict access to the recycle bin to administrators only (or to selected users)? The recycle bin has the same permissions as the share. Set your user permissions on the share. Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 3 hours ago, 007craft said: After trying to troubleshoot my Issue with recycle bin not working on non unassigned drives I reinstalled the plkugin but this time payed attention to the process. I get this exact same error. Looks like the plugin is failing to update the contents of the sbm-extra.conf file, thus it wont work with any unraid Samba shares. So looks like the plugin is currently broken. Can somebody advise a fix? If I turn on file deletion logging, that will even detect files being deleted from share, yet still no share or recycle object shows up (see screenshot) I've updated the plugin. Stop the recycle bin, update the plugin, then re-start the recycle bin. Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 4 hours ago, 007craft said: I'm deleting files from my windows machine. So yes SMB share. In this particular case its the "files" smb share. Located at \\unraid\files (which is actually /mnt/user/files on the unraod machine. Here's a picture of the smb extra settings if it helps. Im not sure if this plugin has an intent to add anything extra to it? I've updated the plugin. Stop the recycle bin, update the plugin, then re-start the recycle bin. Quote Link to comment
NY152 Posted February 10, 2021 Share Posted February 10, 2021 32 minutes ago, dlandon said: The recycle bin has the same permissions as the share. Set your user permissions on the share. For security reasons, it might be good to have the possibility to set the access authorization to the recycle bin to a single user (who will be considered as administrator (root for example) of the recycle bin) with which we will not connect by sharing. This would act as a safeguard in the event of compromised security (ransonware for example) You can also think about not storing the recycle bin in the share but in a place not accessible to the share ! Quote Link to comment
dlandon Posted February 10, 2021 Author Share Posted February 10, 2021 (edited) 45 minutes ago, NY152 said: For security reasons, it might be good to have the possibility to set the access authorization to the recycle bin to a single user (who will be considered as administrator (root for example) of the recycle bin) with which we will not connect by sharing. This would act as a safeguard in the event of compromised security (ransonware for example) You can also think about not storing the recycle bin in the share but in a place not accessible to the share ! I fail to understand your argument about ransomware. How is the recycle bin at any more risk than the share? The recycle bin is part of samba and I don't have a lot of control over it's operation. The .Recycle.Bin folder is in the share. Moving it somewhere else does not make a lot of sense. Edited February 11, 2021 by dlandon Quote Link to comment
007craft Posted February 11, 2021 Share Posted February 11, 2021 Thanks I reinstalled the plugin with the new updated version and now my SMB extras file is populated with: #vfs_recycle_start #Recycle bin configuration [global] syslog only = No syslog = 0 logging = 0 log level = 0 vfs:0 #vfs_recycle_end I also went ahead and removed the "vfs objects=" line. It seems to be working now. Thanks! I guess the only thing I noticed not working is if I make a new file, and delete it right away, it doesnt show up in the recycle bin. I'm assuming thats because when I make a new file its actually making it on cache and files on cache wouldnt goto the bin. So the plugin works, as long as the file has had its chance to be moved over by mover. Quote Link to comment
NY152 Posted February 11, 2021 Share Posted February 11, 2021 8 hours ago, dlandon said: I fail to understand your argument about ransomware. How is the recycle bin at any more risk than the share? The recycle bin is part of samba and I don't have a lot of control over it's operation. The .Recycle.Bin folder is in the share. Moving it somewhere else does not make a lot of sense. The argument regarding ransomware (this was still an example) is that if a ransonware attacks file encryption, the source of its files (the original therefore) is deleted in favor of the encrypted version, the recycle bin could be a rampart in the sense that we would recover the original! So limiting access to a defined user would make sense. Placing them elsewhere would perhaps be more logical if we listen to you (Samba rights) although I doubt it because, for example, on a Synology NAS, the recycle bin can be limited to only the administrators of the machine so the thing is quite possible no ? Quote Link to comment
RealActorRob Posted February 13, 2021 Share Posted February 13, 2021 (edited) Update Edit: Weird. Other files deleted in same dir show up immediately via refresh so I guess that's working but still the weird name on one. Feb 13 16:37:29 unlink => .com.bombich.ccchelper.casetest Feb 13 16:37:29 unlink => .com.bombich.ccc.casetest Feb 13 16:53:05 unlink => Delete me temporary stuff/.smbdeleteAAA97f511e7007fb430 Feb 13 17:01:54 unlink => Delete me temporary stuff/Print Coupons and Earn Points & Cash Back _ MyPoints.pdf Feb 13 17:02:20 unlink => Delete me temporary stuff/netflix choosing.mov Feb 13 17:02:36 unlink => Delete me temporary stuff/sleep.mov The file in bold was a .exe driver file I downloaded from somewhere, nothing strange except it was a longish filename but looked normal in Mac OS X Finder. Top two files from a backup operation...they were in a different share set up with case sensitivity etc. for OS X backups. I presume that share doesn't show because they are dot files or zero length files? (that share is called 'CCC Backups'.) ----------- Fresh install. Will the name of this file change in the log/change the filename later? Feb 13 16:53:05 unlink => Delete me temporary stuff/.smbdeleteAAA97f511e7007fb430 Took a while from the time of deletion to time of it showing in the log/being browseable. Few minutes at least. Also only one share showing in SMB list...is this because nothing has been deleted from those shares I presume? Edited February 13, 2021 by RealActorRob Quote Link to comment
RealActorRob Posted February 14, 2021 Share Posted February 14, 2021 Recommendation: When you click 'Empty Trash' at least be able to configure that to ask "Are You Sure?" like Mac OS Trashcan. An errant click deletes all your files, potentially by accident. Quote Link to comment
dlandon Posted February 16, 2021 Author Share Posted February 16, 2021 New release of Recycle Bin: - Added a permissions setting to set the permissions on the .Recycle.Bin directories. This sets the directory permissions when files are deleted. If you change the permissions setting, all existing directories in the .Recycle.Bin are updated to the new permissions. - Added a confirm check box to enable destructive buttons to help with accidental clicking of empty trash buttons. Quote Link to comment
antihero412 Posted March 6, 2021 Share Posted March 6, 2021 Hello everyone im having an issue setting up Recycle bin to work with a rootshare instead of mapping all my shares i use just one rootshare. has anyone got this working? Quote Link to comment
jonasled Posted March 6, 2021 Share Posted March 6, 2021 Hi, I've updated my unraid today to 6.9.0 and it looks like there is a problem with the recycle bin plugin. When the plugin ist installed on boot, the webui of unraid will not start and if you install it after boot, it will get very slow. Quote Link to comment
dlandon Posted March 6, 2021 Author Share Posted March 6, 2021 7 minutes ago, jonasled said: Hi, I've updated my unraid today to 6.9.0 and it looks like there is a problem with the recycle bin plugin. When the plugin ist installed on boot, the webui of unraid will not start and if you install it after boot, it will get very slow. I'm not seeing this. Post diagnostics. Quote Link to comment
jonasled Posted March 7, 2021 Share Posted March 7, 2021 How can I generate the diagnostics. I'l relativly new to unraid. The other problem is, that if the plugin is installed the webui is unusable, so I can't generate diagnsotics there. Quote Link to comment
Recommended Posts
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.