Auto-mount encrypted drive for multiple user accounts

After doing a fresh install of Dropbox for macOS on File Provider, I was able to put my files on an external drive by following these instructions:

Prior to doing this, my Dropbox files downloaded to ~/Library/CloudStorage and “Dropbox” appeared in the Finder Sidebar in the Locations category.

As you recall (and can see in the directory listing above), I successfully replaced the Documents directory in my Home directory with a symlink to my external drive at /Volumes/Sidecar/Users/nello/Documents. I configured Dropbox to put its files at ~/Documents/CloudStorage/Dropbox, which put these files on my external drive at /Volumes/Sidecar/Users/nello/Documents/CloudStorage/Dropbox.

After the processing finished, clicking on “Dropbox” in Locations brought up a message saying “This is an unlinked Dropbox” and clicking on the button to remove the unlinked files removed “Dropbox” from Locations.

So now I have a local copy of my Dropbox files and they do not take up any room on the internal dive:

nello@miniMe library % pwd
/Users/nello/library
nello@miniMe library % ls -la CloudStorage
total 24
drwxr-xr-x+  5 nello  staff   160 Jan 19 18:56 .
drwx------+ 93 nello  staff  2976 Jan 18 08:40 ..
-rw-r--r--@  1 nello  staff  8196 Jan 19 20:48 .DS_Store
drwx------@  9 nello  staff   288 Jan 17 15:47 Box-Box
drwx------@ 10 nello  staff   320 Jan 17 15:56 OneDrive-Personal

Now that I know that macOS File Provider isn’t inconsistent with storage on an external drive, hopefully I also can find a way to sync files from these other cloud services to my external drive instead of on the internal drive at ~/Library/CloudStorage:

  1. Box
  2. One Drive
  3. Google Drive

UPDATE 2025-01-30T21:56:00Z

Google Drive can NOT be moved if using File Provider, according to Google Drive Help. (Scroll down and and click on “Learn how File Provider differs from the alternative streaming method,” which reveals a table that includes this row):

Feature File Provider Alternative streaming method
Find your files You can find your files in the Finder sidebar, under “Locations.”For advanced users: You can find them in “/Library/CloudStorage” by default. You can’t change this location. You can find your files in the Finder sidebar, under “Favorites.”For advanced users: You can find them in “/Volumes/GoogleDrive” by default. You can change this location.

UPDATE 2025-10-13T16:25:00Z

Now that I’m finally getting around to implementing @Shamino’s recommendation of using Carbon Copy Cloner (CCC) to back up cloud storage volumes syncronized via macOS’ FileProvider service, I read the CCC Knowledge Base article on this subject very carefully. It appears to me that I need move Dropbox back to ~/Library/CloudStorage for two reasons:

  1. CCC’s stanard method of backing up cloud volumes applies to only volumes found in ~/Library/CloudStorage, which is on the internal SSD. I can’t see how to make a single Backup Task’s Source include a directory on an external SSD as well as ~/Library/CloudStorage. Yes, I could create a separate Task for the external SSD, but doing is a slippery slope towards a Rube Goldberg backup because ….
  2. CCC recommends backing up the Cloud Volumes separately from the backup of all non-FileProvider files because doing so simplifies restoring these files.

Unfortunately, the Dropbox app does not permit moving the Dropbox folder location from the external SSD to ~/Library/CloudStorage.

I followed the instructions for an advanced reinstall.

And now all four cloud storage volumes are in ~/Library/CloudStorage, which is their default location:

nello@miniMe % cd ~/Library/CloudStorage
nello@miniMe CloudStorage % ls -la
total 32
drwxr-xr-x+   7 nello  staff    224 Oct 13 10:54 .
drwx------+ 104 nello  staff   3328 Jul 20 10:45 ..
-rw-r--r--@   1 nello  staff  14340 Oct 13 12:13 .DS_Store
drwx------@   9 nello  staff    288 Jan 17  2025 Box-Box
drwx------@  37 nello  staff   1184 Oct 13 11:56 Dropbox
dr-x------@   7 nello  staff    224 Jan 30  2025 GoogleDrive-←snip→ 
drwx------@  11 nello  staff    352 Oct 12 11:12 OneDrive-Personal
nello@miniMe CloudStorage %
1 Like