December 15, 20169 yr Description: vfs_recycle in samba is not putting deleted files in recycle bin. How to reproduce: Install Recycle Bin plugin or add the following to smb-extra.conf and delete files: [global] vfs objects = recycle syslog only = Yes log level = 0 vfs:0 recycle:repository = %P/.Recycle.Bin/ recycle:directory_mode = 0777 recycle:keeptree = Yes recycle:touch = Yes recycle:touch_mtime = Yes recycle:versions = Yes recycle:exclude = *.tmp,*.ign recycle:exclude_dir = .Recycle.Bin Expected results: Files deleted will be put into the .Recycle.Bin folder. Actual results: Files are not added to the .Recycle.Bin folder. Other information: This just started with rc6.
December 15, 20169 yr Author What do you think the problem is? Meaning, what do you think the solution is? I'm honestly not sure. I just noticed in in rc6. Has anything changed in samba lately? An update, changes in configuration? I have to restart samba for the vfs_recycle to take effect. Any changes in the start/stop script? I haven't had any time lately to deep dive into it. When I run the script from the cli everything appears to be normal though. I can try to devote some time to it this weekend to see if I can find anything.
December 15, 20169 yr What do you think the problem is? Meaning, what do you think the solution is? I'm honestly not sure. I just noticed in in rc6. Has anything changed in samba lately? An update, changes in configuration? I have to restart samba for the vfs_recycle to take effect. Any changes in the start/stop script? I haven't had any time lately to deep dive into it. When I run the script from the cli everything appears to be normal though. I can try to devote some time to it this weekend to see if I can find anything. No just the vfs_fruit stuff. Maybe what's happening is this: for each share we now have these lines: ea support = yes vfs objects = catia fruit streams_xattr fruit:resource = file fruit:metadata = netatalk fruit:locking = none fruit:encoding = native Probably that 'vfs objects' line is overriding your global 'vfs objects' line. You can test by editing /etc/samba/smb-shares.conf after array started and append "recycle" to the 'vfs objects' line for a share you want to have a recycle bin for. Let me know if that works, we may need to add a bit more sophistication setting this up
December 15, 20169 yr Author What do you think the problem is? Meaning, what do you think the solution is? I'm honestly not sure. I just noticed in in rc6. Has anything changed in samba lately? An update, changes in configuration? I have to restart samba for the vfs_recycle to take effect. Any changes in the start/stop script? I haven't had any time lately to deep dive into it. When I run the script from the cli everything appears to be normal though. I can try to devote some time to it this weekend to see if I can find anything. No just the vfs_fruit stuff. Maybe what's happening is this: for each share we now have these lines: ea support = yes vfs objects = catia fruit streams_xattr fruit:resource = file fruit:metadata = netatalk fruit:locking = none fruit:encoding = native Probably that 'vfs objects' line is overriding your global 'vfs objects' line. You can test by editing /etc/samba/smb-shares.conf after array started and append "recycle" to the 'vfs objects' line for a share you want to have a recycle bin for. Let me know if that works, we may need to add a bit more sophistication setting this up I think you are onto the problem. I tried your suggestion, but nothing worked. Samba has to be restarted to enable the vfs_recycle object and the smb-shares.conf gets re-written reverting my edit. I don't understand enough about vfs objects to make any suggestions on solving the problem.
December 15, 20169 yr After array is started, edit the section for the share you want to try, then type samba restart or /etc/rc.d/rc.samba restart
December 16, 20169 yr Author Edit smb-shares.conf: [AV Media] path = /mnt/user/AV Media comment = Various AV Media browseable = yes # Private writeable = no read list = write list = admin valid users = admin ea support = yes vfs objects = catia fruit streams_xattr extd_audit recycle fruit:resource = file fruit:metadata = netatalk fruit:locking = none samba restart smb-shares.conf after restart: [AV Media] path = /mnt/user/AV Media comment = Various AV Media browseable = yes # Private writeable = no read list = write list = admin valid users = admin ea support = yes vfs objects = catia fruit streams fruit:resource = file fruit:metadata = netatalk fruit:locking = none Edits are removed so I can't test.
December 16, 20169 yr Right, you have to Start array first. Then edit /etc/samba/smb-shares.conf. Then from command line type 'samba restart'. The smb-shares.conf file is regenerated each time you click Start button (and there are other events that cause this such as creating a new share or disk format completion). This should be sufficient to test if that's the problem. The 'svcs_restarted' event happens immediately following that file being regenerated. A plugin that wanted to change samba settings on a per-share basis would use that event to generate the extra lines in the appropriate section of smb-names.conf and then restart samba. Also it "should work" to simply touch /etc/smb.conf file because samba will notice this and perform an internal 'restart' on it's own - see man page for smbd.
December 16, 20169 yr Author In my test above, the array was started. It appears that you are suggesting that the recycle bin plugin manipulate the smb-shares.conf file. I am not at all comfortable doing anything to that file. Too much could go wrong and I am not in a position to support that scheme. I've been doing a little research on how a global vfs object setting would not be negated by a per share vfs object setting. So far I've found very little.
December 16, 20169 yr Author Could we do something like this: [AV Media] path = /mnt/user/AV Media comment = Various AV Media browseable = yes # Private writeable = no read list = write list = admin valid users = admin ea support = yes include = /etc/samba/vfs_objects.cfg fruit:resource = file fruit:metadata = netatalk fruit:locking = none vfs_objects.cfg: vfs objects = catia fruit streams I could add what I need to the vfs_objects.cfg file for inclusion into the smb-shares.conf. EDIT: This would permit backward compatibility of the Recycle Bin with older versions of unRAID.
December 17, 20169 yr Author Or even better for me is to let me write the vfs objects I want to the vfs_objects.cfg file and you append them to your vfs object lines.
December 17, 20169 yr Or even better for me is to let me write the vfs objects I want to the vfs_objects.cfg file and you append them to your vfs object lines. This is a pretty nasty problem to handle in the general case because the each of those vfs modules has parameters and the order in which they appear in the 'vfs objects' parameter is significant. Probably it would be better to add 'recycle bin' (and any other) extension natively. Are you aware of other plugins that try to incorporate other samba vfs extensions?
December 18, 20169 yr Author Or even better for me is to let me write the vfs objects I want to the vfs_objects.cfg file and you append them to your vfs object lines. This is a pretty nasty problem to handle in the general case because the each of those vfs modules has parameters and the order in which they appear in the 'vfs objects' parameter is significant. Probably it would be better to add 'recycle bin' (and any other) extension natively. Are you aware of other plugins that try to incorporate other samba vfs extensions? Agreed, it could be pretty messy because of the parameters. In the recycle bin case, I set the recycle bin parameters in the smb-extra.conf as global parameters that apply to all shares with the vfs_recycle object. The parameters are global to all shares. I don't know of any other plugins that use vfs objects.
Archived
This topic is now archived and is closed to further replies.