[RESOLVED] Recycle bin for SMB/CIFS

  • Hello everyone,


    I am new to OMV and linux at all, but after suggestion from friends I installed OMV as my SOHO file server with 7 clients running windows 8.1 and now i am happy that i did it since i have over 30 days up time without any problems. With help of this forum and pages about OMV managed to get everything running (mirror raid, shares, file system) without any problems but now i have question about recycle bin for SMB/CIFS share.


    After deleting some of not important files by accident I realized that i need recycle bin for 2 shared folders and went to shared folders options and enabled box where is recycle bin and left file size and days on 0 value. Problems is now i can't see recycle bin in my shared folders, tried with deleting some test files to see if it will appear but still nothing.


    So my question is how i can see recycle bin folder and what is in it? Have in mind that i am really beginner when this type of software and my guess is that i missing something really basic but can't see it and it's drives me crazy.


    Running OMV 0.5.21 with usb backup and antivirus plugins.

  • I think if you are using it you need to have a minimum size and a number of days. If you have 0 for size and days for items to remain there it is probably not storing anything. It depends on what average size of files you are using in the shared folders. If they are small documents (5kb-10kb) you may only need like a 100 MB size and maybe 7 days.


    I just looked at the configuration and if you put 0 for size it is unrestricted and should save any file deleted.


    0 for days is manual deletion.


    You should be able to access the files via command line. I've never used recycle bin.


    I am testing right now. Will write back in a bit.


    In the share that you activated the recycle bin it creates a .recycle folder. Whatever user deletes a file it will create a subfolder with that user's username and then the deleted file will be in that folder. So path would be like this:


    /media/uuid/sharedfoldername/.recycle/username/files


    You may have to learn your way around linux a bit better to get the files. Most useful will be how to use the cp and rm commands.


    BTW, I had to reboot before the recycle bin was active.

  • Thank you a lot tekkbebe, problem was in reboot, after rebooted server machine tested it again and files started to show up in /sharedfoldername/.recycle/username/files as you said. OMV web GUI only asked to press apply after changed setting not to restart so that is why i didn't do it at first time.


    I left 0 values because i wanted to manually delete files and to have unrestricted file sizes.


    Also i noticed on some of my clients pc folder .recycle appear as hidden so i needed to set in folder options to see hidden files.


    Thanks again on quick response.

  • I have got errors on my daily cron job:


    /etc/cron.daily/openmediavault-samba-recycle:
    [: 7: missing ]
    /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 7: VIDEOS//.recycle: not found
    /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 8: VIDEOS//.recycle: not found
    find: `/media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FOTOS': No such file or directory
    /var/lib/openmediavault/cron.d/samba-recycle-dd889936-b811-4569-b6e8-dfb1f1e870eb: 10: VIDEOS//.recycle: not found
    find: `/media/cc264c09-f354-435b-8e45-7bc2ac9f159f/FOTOS': No such file or directory


    I deleted those SMB shares/folders (VIDEOS and FOTOS') recently. But i cannot find where to remove these dead links..


    Sorry if this is not the right tread.. ;)

  • Change the contents of this file /etc/cron.daily/openmediavault-samba-recycle to what is in the codebox. I'm not sure if it will hold but try and let me know. If you have other shares that are using a cron job show me contents of this file before you change it.


    Bash
    #!/bin/sh
    # This configuration file is auto-generated.
    # WARNING: Do not edit this file, your changes will be lost.
    find /var/lib/openmediavault/cron.d -maxdepth 1 -type f -iname 'samba-recycle-*' -exec {} \;
  • Thanks for your quick reply!


    This is what was already in openmediavault-samba-recycle:

    #!/bin/sh
    # This configuration file is auto-generated.
    # WARNING: Do not edit this file, your changes will be lost.
    find /var/lib/openmediavault/cron.d -maxdepth 1 -type f -iname 'samba-recycle-*' -exec {} \;


    I have a couple more smb shares that use recycle.. Is that what you mean? :)

  • root@SERVER:~# cat /etc/samba/smb.conf

  • Weird, it seems that i didn't get any error in todays mail warnings about Anacron daily jobs. Only a message of an update.. Maybe i touched some files, but without changing them?? I let you know what happens tomorrow, thanks!!!

  • Hello Guys,


    I have enabled recycle bin in samba share. The problem is that the .recycle folder stays hidden. I want keep it visible by default.

    And sometimes the deleted file appears as .samba111347 in .recycle folder.


    Would love to get an insight.


    Thank You…

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!