All Opened Files Put A Temp Copy Of Themselves In The .recycle Folder That Shouldn't Exist?

  • Hello,


    Been a user of OMV since 5.x but recently wanted to create one for home and used 6.x . My home OMV system has OMV-extras, snapraid, mergerfs, sharerootfs, and backup plugins installed. I have a pool configured and snapraid running on that. The pool is accessed via SMB/CIFS primarily through Linux clients, though I have one laptop that is Windows.


    Whenever I open any file, it just creates a copy in the .recycle folder. However the recycle bin option is Disabled under SMB/CIFS -> Settings -> Home Directories. So I don't know why I even have a .recycle folder in the first place. Tried enabling and disabling the option to no effect. Honestly I don't mind having that folder there, but I don't like how every file I open creates a temp file there that is not removed after the file is closed. What really bothers me is related to password-protected archives.


    My main issue is that of a security nature. When I open password-protected archives and enter the password to view the file and then close that archive, a non-password protected file of what I just viewed is left in the .recycle folder ! So someone else can come along and view the file that is supposed to be password protected! This is unacceptable.


    How do I fix this? I tried googling this but no one talks about the specific issue I'm having. Any suggestions/solutions would be appreciated.

    • Official Post

    Hmmm, strange behaviour of Samba. To me the OMV generated smb.conf looks ok, no recycle bin is configured when the checkbox is not set. So this must be something internal to Samba. Have you checked the issue tracker of the upstream Samba project? Please note that OMV is only generating the configuration of the services it provides, everything else is out of the control of the OMV project. Bugs of the services used by OMV have to be reported at Debian or the upstream project itself.

    • Official Post

    OK, did some testing and the .recycle dir is only populated with a file if it is deleted AND the recycle checkbox is checked.


    There are more questions. Where is the file opened, in a global share or a specific home dir? Where is the unencryped archive located after you've opened it? In the shared folder or the home share?

    Is it possible that you have enabled recycle bin and the behaviour you see is the result of your archive tool? Maybe it somehow duplicates the file for decryption and deletes it afterwards.


    If there is a copy of your previously opened archive in the .recycle dir, then you MUST have enabled the recycle bin feature. Samba will surely not create this dir on its own.

  • Hello,


    I apologize for leaving one important piece of information out: I installed OMV 6.x in a Proxmox (7.4) VM. I was focused on the problem that I forgot to disclose the setup. I wonder if other people have had issues related to VMs?


    So I setup a VM to install OMV 6.x . Then I followed this guide:

    External Content www.youtube.com
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
    BUT I started from Step 4, which was installing OMV since I know how to create a USB install drive. Used a 120GB Kingston SSD as my boot drive. Also I skipped the static IP step due to laziness :rolleyes: . Also skipped the "Install Drives" part because I have 8 drives on a SAS/SATA controller setup as passthrough to the VM (only that specific VM can see the controller and its drives). Skipped "flashmemory" plugin since I'm using an SSD. I do not have SSL/TLS enabled.


    My POOL uses 4 1TB drives and I have 2 1TB drives for parity. That's pretty much it for how I setup the OMV system. After that I installed sharerootfs and backup plugins but I never actually used them. I was originally gonna backup OMV through these plugins but decided to make a VM backup instead.


    I never touched the recycle bin setting. It just happened to be there. In an attempt to turn off the .recycle folder I tried to enable the recycle bin -> restart OMV -> disable the recycle bin -> restart OMV. But it remained.



    So I primarily use Fedora for accessing the OMV shared folder. I did some further testing:

    - I tried cut and paste of a .gz file from a local drive to the OMV share in a different folder and no file was created in the .recycle folder.

    - I tried copy and paste of a .gz file from a local drive to the OMV share in a different folder and no file was created in the .recycle folder.

    - I tried cut and paste of a .gz file from a folder on the OMV share to a different folder on the OMV share and no file was created in the .recycle folder.

    - I tried opening and closing a .PDF file on the OMV share and no file was created in the .recycle folder.

    - I tried opening and closing a .txt file on the OMV share and no file was created in the .recycle folder.

    - I tried opening a .rtf file on the OMV share and a file was created in the recycle bin (the file was named sbinfo.rtf and it created ".~lock.sbtest info.rtf#" in the same folder and when I closed the file, it sent the lock file to the .recycle folder with the same folder structure.)

    - I tried opening a .doc file on the OMV share and a file was created in the recycle bin (the file was named Freespace 2 Campaign.doc and it created ".~lock.Freespace 2 Campaign.doc#" in the same folder and when I closed the file, it sent the lock file to the .recycle folder with the same folder structure.)

    - I opened the same Freespace 2 Campaign.doc on the local drive and it created ".~lock.Freespace 2 Campaign.doc#" in the same folder. However, when I closed the file the lock file was removed and nowhere to be found, not even in the local recycle bin.

    - I tried opening a password-protected .7z file on the OMV share, which doesn't prompt for a password until you attempt to open a file within the archive, and no file was created in the .recycle folder or next to the file. The same held true when I closed the .7z file. However, when I attempt to open a text file within the archive, after entering the password to view the file, it creates ".ptempXXXXXX" (the Xs are randomly generated characters) in the same folder with a copy of the opened file in that folder w/ same name. Also a ".ptestouttmpXXXXXX" (the Xs are randomly generated characters) file is created in the .recycle folder with the same folder structure, but the file itself contains nothing when I open with a text program. As soon as I close that text file while the archive remains open, the same temp files in both locations remain. As soon as I close the archive, the ptemp folder and file are moved to the .recycle folder with the same folder structure. Additionally another .ptestouttmp file is created next to the 1st .ptestouttmp file in the .recycle folder. Now a non-password protected .txt file is available for access in the .recycle folder.

    - I tried opening the same password-protected .7z file on the local drive and no file was created in the .recycle folder or next to the file. The same held true when I closed the .7z file. However, when I attempt to open a text file within the archive, after entering the password to view the file, it creates the ".ptempXXXXXX" (the Xs are randomly generated characters) in the same folder with a copy of the opened file in that folder w/ same name. BUT it did not create a ".ptestouttmpXXXXXX" file in the Recycle bin. As soon as I close the archive, the .ptemp folder and file are removed and nowhere to be found, not even in the recycle bin.


    So it seems to be specific to certain programs and not all files like I originally assumed. Also this has nothing to do with moving files between drives or on the same drive. The .rtf and .doc files are opened by LibreOffice while the .7z file is opened by PeaZip. It seems that the programs in question know how to perma delete temporary files on the local disk but not on the OMV shared folder.


    Also, for a test I deleted a .gz file and it went straight to the .recycle folder with the same folder structure. This is while the recycle bin option remains disabled. Is there any other place where a recycle bin is enabled?


    On a side note, I noticed that on my Fedora system, the icons of the files were generic ones. What I mean is for example, on my local drives the image itself would be the icon for a .jpg file but a generic pic icon would be there for the files on the OMV shared folder. Dunno if this means something or not.

  • Any help would be appreciated regarding this recycle bin issue. Thanks.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!