Disabling the Bin/Trash function on a Filespace on Linux

  • Updated

Overview

By default,  many Linux distributions support a per-volume "Move to Bin" and "Move to Trash" function. Whereby files that are marked for deletion from the UI go to the dedicated .Trashes or .Trash-1000 folder. These folders are hidden directories on the volume where the file originally resided. This means that files and folders are not immediately deleted, rather they are moved to a temporary holding area before you "Empty the Bin".

Commands like 'rm' bypass the Bin/Trash as they do not just mark files for deletion, but delete them right away.

Since LucidLink is mounted like any other Filesystem, the "Move to Bin" functionality is present "out of the box", which is great in most situations but you may want to disable this for your workflow.

 

You can prevent files to be moved to the .Trashes  folder by following the below steps as the Filespace root user or an Administrator.

 

Disabling Linux Trash Functionality

The below 'rm' command will delete all of the Files and Folders currently held in the Trash, for all users of the Filespace! Please ensure you have no data in the Trash that you wish to preserve.
  1. Connect to your Filespace as the root user or an Administrator. Ensuring you have Read/Write access to the root of the Filespace.

  2. Delete the .Trash-xxxx folder at the root of the Filespace and replace it with a dummy file by running the following commands in order:
    Replacing myFilespace with the name of your Filespace mount.
    sudo rm -Rf /mnt/myFilespace/.Trash-1000
    sudo touch /mnt/myFilespace/.Trash-1000
  3. GNOME/Linux will no longer be able to move deleted files and folders to the Filespace Trash folder and is now considered disabled.
On Linux with GNOME (and other) Desktop Environments, the Trash folders are located as hidden folders on the volume, appended with the User's UID. In the above case this is disabling the Trash for Linux User with UID 1000. This can differ per user, typically UID 1000 is the first created local user of the system. To disable the functionality for all users in your environment you may first need to check the UIDs of all Linux Users working in your Lucid Filespace.

To revert (enable the Trash) please run the following command:

sudo rm -f /Volumes/myFilespace/.Trash-1000

 

If you require further support with this, please contact our Support Team by raising a ticket here:

https://support.lucidlink.com/hc/en-us/requests/new 

Was this article helpful?

0 out of 0 found this helpful