September 17, 20205 yr Author 6 hours ago, trurl said: Maybe I'm missing something, but I don't see what rm has to do with this plugin. Recycle Bin only works with files deleted over the network with SMB. I was using rm with the 'find' command to purge aged files in the recycle bin. I've changed it now because it seems that 'rm -rf' removes too much and removes files that haven't been aged. I switched to using the -delete switch with 'find' which doesn't exhibit the same behavour. He was just explaining how the use of 'rm -rf; with 'find' was potentially causing some problems. I was able to duplicate the issue he was explaining.
September 18, 20205 yr 13 hours ago, dlandon said: I was using rm with the 'find' command to purge aged files in the recycle bin. I've changed it now because it seems that 'rm -rf' removes too much and removes files that haven't been aged. I switched to using the -delete switch with 'find' which doesn't exhibit the same behavour. He was just explaining how the use of 'rm -rf; with 'find' was potentially causing some problems. I was able to duplicate the issue he was explaining. Thanks for explaining to trurl and for the fix - that -delete switch is a neat solution since it also enables -depth (strange word to use I thought) so files are listed before directories and therefore all (aged) empty directories are removed in one pass (in a much simpler way than I mentioned above).
September 30, 20205 yr I seem to have an issue where the deleted files log no longer works. This issue seems to have started some time around July. On two separate Unraid systems, despite the "Log Deleted Files" flag being enabled, it no longer tracks them. When I delete a file, it correctly ends up in the recycle bin. But upon clicking "empty trash" or waiting for the automated schedule to execute, it no longer shows an Jul 19 02:26:13 unlink => xyz entry. This is what the recycle bin configuration looks like under smb config #vfs_recycle_start #Recycle bin configuration [global] syslog only = No syslog = 0 logging = 0 log level = 0 vfs:0 #vfs_recycle_end
October 1, 20205 yr Author 13 hours ago, Spiritreader said: On two separate Unraid systems, despite the "Log Deleted Files" flag being enabled, it no longer tracks them. When I delete a file, it correctly ends up in the recycle bin. But upon clicking "empty trash" or waiting for the automated schedule to execute, it no longer shows an Jul 19 02:26:13 unlink => xyz entry. The log entry is only when the file is initially deleted, not when it is removed from the recycle bin.
October 1, 20205 yr Oh sorry I got that confused. Still, no log entries show up unfortunately. My workflow is as follows. - Delete file from SMB share - check recycle bin, no entry Deleting file from smb share https://i.imgur.com/JGgu0Q4.png Shows up in recycle bin when clicking on inspect https://i.imgur.com/HYj8MeT.png No delete log entry https://i.imgur.com/gInWpzH.png
October 3, 20205 yr Author On 10/1/2020 at 10:13 AM, Spiritreader said: Oh sorry I got that confused. Still, no log entries show up unfortunately. My workflow is as follows. - Delete file from SMB share - check recycle bin, no entry Deleting file from smb share https://i.imgur.com/JGgu0Q4.png Shows up in recycle bin when clicking on inspect https://i.imgur.com/HYj8MeT.png No delete log entry https://i.imgur.com/gInWpzH.png If you post diagnostics, we can help further. I have no issues with the logging.
October 3, 20205 yr Here are the diagnostics of both servers where logging isn't working. tower-diagnostics-20201003-1737.zip ums-diagnostics-20201003-1742.zip
October 3, 20205 yr Author 1 hour ago, Spiritreader said: Here are the diagnostics of both servers where logging isn't working. tower-diagnostics-20201003-1737.zip 219.23 kB · 1 download ums-diagnostics-20201003-1742.zip 193.98 kB · 0 downloads I think your additions to the smb-extra.conf file is causing some issues.
October 4, 20205 yr 22 hours ago, dlandon said: I think your additions to the smb-extra.conf file is causing some issues. I have removed the extra configuration. Now it's just unassigned devices and the recycle bin. #unassigned_devices_start #Unassigned devices share includes include = /tmp/unassigned.devices/smb-settings.conf #unassigned_devices_end #vfs_recycle_start #Recycle bin configuration [global] syslog only = No syslog = 0 logging = 0 log level = 0 vfs:0 #vfs_recycle_end Still no logging when deleting files unfortunately.
October 4, 20205 yr Author 5 minutes ago, Spiritreader said: I have removed the extra configuration. Now it's just unassigned devices and the recycle bin. #unassigned_devices_start #Unassigned devices share includes include = /tmp/unassigned.devices/smb-settings.conf #unassigned_devices_end #vfs_recycle_start #Recycle bin configuration [global] syslog only = No syslog = 0 logging = 0 log level = 0 vfs:0 #vfs_recycle_end Still no logging when deleting files unfortunately. Restart the recycle bin.
October 4, 20205 yr 3 hours ago, dlandon said: Restart the recycle bin. I've tried the following: - stop and restart the recycle bin - toggle logging off and on while the recycle bin is started - stop recycle bin, toggle logging off and on, start the recycle bin. No change, still not logging.
October 4, 20205 yr Author 48 minutes ago, Spiritreader said: I've tried the following: - stop and restart the recycle bin - toggle logging off and on while the recycle bin is started - stop recycle bin, toggle logging off and on, start the recycle bin. No change, still not logging. Go to a command prompt and enter the folowing: cat /var/log/samba/log.smbd | grep unlink You should see the samba log entries for deleted files.
October 4, 20205 yr Unfortunately nothing shows up. I omitted the unlink to check what else samba was logging, and there's nothing there except for when the daemon is restarted due to config changes root@Tower:~# cat /var/log/samba/log.smbd [2020/10/04 21:45:16.282004, 0] ../../source3/smbd/server.c:1775(main) smbd version 4.11.4 started. Copyright Andrew Tridgell and the Samba Team 1992-2019
October 4, 20205 yr Author 1 hour ago, Spiritreader said: Unfortunately nothing shows up. I omitted the unlink to check what else samba was logging, and there's nothing there except for when the daemon is restarted due to config changes root@Tower:~# cat /var/log/samba/log.smbd [2020/10/04 21:45:16.282004, 0] ../../source3/smbd/server.c:1775(main) smbd version 4.11.4 started. Copyright Andrew Tridgell and the Samba Team 1992-2019 Just released a fix.
November 17, 20205 yr I've set my age days to 6 months but I still can see files in the Recycle Bin folder older than that after hitting Remove Aged Files. Does that only work on schedule (which I have turned off) or am I doing something wrong? Also where can I find log deleted files? Thanks!
November 18, 20205 yr Author 17 hours ago, Rendeaust said: I've set my age days to 6 months but I still can see files in the Recycle Bin folder older than that after hitting Remove Aged Files. Does that only work on schedule (which I have turned off) or am I doing something wrong? Also where can I find log deleted files? Thanks! You aren't doing anything wrong. The age date that the recycle bin uses is the last access time (atime in Linux) which is set when the file is deleted and sent to the .Recycle.Bin folder, not the last modified time (mtime in Linux). If anything changes the atime of the file in the .Recycle.Bin, that will affect the age date of that file. The deleted files log is found on the 'Deleted Files' tab of the Recycle Bin. This log is derived from the '/var/log/samba/log.smbd' file. That file is lost on reboot because it is kept in the ram file system, so you won't be able to see the deleted files after a reboot.
December 22, 20205 yr Hi @dlandon, First, thank you for this plugin, to me is a must have, just in case someone, or myself, delete somethink we don't want to. Said that, and let me tell you that a I didn't read all pages of this thread, there are a few ..., there is a possibility to avoid that any user that have access to the share, delete files inside the bin? Only be able to see what inside (Read Only). An to delete the files do it from the plugin. This is to avoid that someone, with no good intentions, to delete some file completely, this functionality was used by my older NAS, a synology (bye bye forever, right now I hate that type of NAS, they are so bad compared to something like Unraid...), and was pretty useful and give higher security if the intention is to protect files from shares from unauthorized users that somehow access the share. Of course this is just an idea to further improve your plugin, it's ok if you see this idea a pain is the ... :P. Let me know your thoughts about this. Regards Edited December 22, 20205 yr by iTHiNDiL
December 23, 20205 yr Author 4 hours ago, iTHiNDiL said: Hi @dlandon, First, thank you for this plugin, to me is a must have, just in case someone, or myself, delete somethink we don't want to. Said that, and let me tell you that a I didn't read all pages of this thread, there are a few ..., there is a possibility to avoid that any user that have access to the share, delete files inside the bin? Only be able to see what inside (Read Only). An to delete the files do it from the plugin. This is to avoid that someone, with no good intentions, to delete some file completely, this functionality was used by my older NAS, a synology (bye bye forever, right now I hate that type of NAS, they are so bad compared to something like Unraid...), and was pretty useful and give higher security if the intention is to protect files from shares from unauthorized users that somehow access the share. Of course this is just an idea to further improve your plugin, it's ok if you see this idea a pain is the ... :P. Let me know your thoughts about this. Regards The Recycle Bin has the same permissions as the share they were deleted from. If a user has read and write permissions on the share, then they have read and write permissions on the Recycle Bin.
December 26, 20205 yr I noticed on the beta thread for 6.9 that you reported that Recycle Bin was responsible for the log filling up with smbd_audit events followed by a vague post that you found the issue and resolved it. I see my syslog filling up with these events and wonder if it's related to this plugin and specifically to the extd_audit flag that the plugin sets up? Any insight you can provide as to why this might be happening? (running 6.9.0-rc2). Thanks! Edited December 26, 20205 yr by Gonzo-the-great typos
December 26, 20205 yr Is there a way to make the recycle bin inaccessible on the share @dlandon ? I want to make dumping the recycle bin/restoring only available from unraid itself and not over the share/eliminate the ability to delete the recycle bin. Edited December 26, 20205 yr by NasOnABudget
December 26, 20205 yr 12 minutes ago, NasOnABudget said: make the recycle bin inaccessible on the share Settings - SMB - Hide "dot" files
December 26, 20205 yr 1 hour ago, trurl said: Settings - SMB - Hide "dot" files Don't think this is an answer for the question: This only will flag the recycle bin hiden, if you have "show hidden files" enabled you still be able to access the bin. @NasOnABudget, right now, as dlandon said a few posts before, there is no way to accomplish this, the bin have the same permsissions as the shared folder. Edited December 26, 20205 yr by iTHiNDiL
December 28, 20205 yr On 12/26/2020 at 4:01 PM, iTHiNDiL said: Don't think this is an answer for the question: This only will flag the recycle bin hiden, if you have "show hidden files" enabled you still be able to access the bin. @NasOnABudget, right now, as dlandon said a few posts before, there is no way to accomplish this, the bin have the same permsissions as the shared folder. 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. Not having this puts a pretty big damper on unraid as a whole for me. Im wondering what can be done about it, like through a VM or something similar. I guess Ill have to start poking around in ubuntu or something. I was really hoping there would be some way @dlandon might have of having the recycle bin for one share be a different share or similar. (btw I only mentioned again because I edited in the name the last time so Im not sure if that still pings the user) Edited December 28, 20205 yr by NasOnABudget
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.