Disabling the Bin/Trash function for a Filespace on macOS and Linux

  • Updated

Overview

By default, macOS and 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.


The macOS Bin and Linux/GNOME Trash are handled uniquely by the respective Operating System so must be disabled and enabled independently.

 

Disabling macOS Trash Functionality

The below 'rm' command will delete all of the Files and Folders currently held in the Bin, for all users of the Filespace! Please ensure you have no data in the Bin that you wish to preserve.

On macOS 11+ you may need to first give Terminal Full Disk Access via System Settings > Privacy & Security > Full Disk Access > Terminal

Screenshot_2023-04-05_at_14.40.40.png

  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 .Trashes 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 as seen in macOS Finder.
    sudo rm -Rf /Volumes/myFilespace/.Trashes
    sudo touch /Volumes/myFilespace/.Trashes
  3. macOS will no longer be able to move deleted files and folders to the Filespace .Trashes folder and is now considered disabled.

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

sudo rm -f /Volumes/myFilespace/.Trashes

 

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