dlandon Posted September 17, 2020 Author Share Posted September 17, 2020 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. 1 1 Quote Link to comment
-Q- Posted September 18, 2020 Share Posted September 18, 2020 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). Quote Link to comment
Spiritreader Posted September 30, 2020 Share Posted September 30, 2020 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 Quote Link to comment
dlandon Posted October 1, 2020 Author Share Posted October 1, 2020 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. Quote Link to comment
Spiritreader Posted October 1, 2020 Share Posted October 1, 2020 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 Quote Link to comment
dlandon Posted October 3, 2020 Author Share Posted October 3, 2020 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. Quote Link to comment
Spiritreader Posted October 3, 2020 Share Posted October 3, 2020 Here are the diagnostics of both servers where logging isn't working. tower-diagnostics-20201003-1737.zip ums-diagnostics-20201003-1742.zip Quote Link to comment
dlandon Posted October 3, 2020 Author Share Posted October 3, 2020 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. Quote Link to comment
Spiritreader Posted October 4, 2020 Share Posted October 4, 2020 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. Quote Link to comment
dlandon Posted October 4, 2020 Author Share Posted October 4, 2020 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. Quote Link to comment
Spiritreader Posted October 4, 2020 Share Posted October 4, 2020 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. Quote Link to comment
dlandon Posted October 4, 2020 Author Share Posted October 4, 2020 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. Quote Link to comment
Spiritreader Posted October 4, 2020 Share Posted October 4, 2020 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 Quote Link to comment
dlandon Posted October 4, 2020 Author Share Posted October 4, 2020 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. 1 Quote Link to comment
Spiritreader Posted October 4, 2020 Share Posted October 4, 2020 Works fine again on both servers. Thank you! Quote Link to comment
TDIcelander Posted October 17, 2020 Share Posted October 17, 2020 Just installed this. Works perfectly. Thanks!!! Quote Link to comment
Rendeaust Posted November 17, 2020 Share Posted November 17, 2020 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! Quote Link to comment
dlandon Posted November 18, 2020 Author Share Posted November 18, 2020 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. Quote Link to comment
iTHiNDiL Posted December 22, 2020 Share Posted December 22, 2020 (edited) 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, 2020 by iTHiNDiL Quote Link to comment
dlandon Posted December 23, 2020 Author Share Posted December 23, 2020 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. Quote Link to comment
Gonzo-the-great Posted December 26, 2020 Share Posted December 26, 2020 (edited) 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, 2020 by Gonzo-the-great typos Quote Link to comment
NasOnABudget Posted December 26, 2020 Share Posted December 26, 2020 (edited) 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, 2020 by NasOnABudget Quote Link to comment
trurl Posted December 26, 2020 Share Posted December 26, 2020 12 minutes ago, NasOnABudget said: make the recycle bin inaccessible on the share Settings - SMB - Hide "dot" files Quote Link to comment
iTHiNDiL Posted December 26, 2020 Share Posted December 26, 2020 (edited) 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, 2020 by iTHiNDiL Quote Link to comment
NasOnABudget Posted December 28, 2020 Share Posted December 28, 2020 (edited) 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, 2020 by NasOnABudget 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.