Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

edjusted

macrumors regular
Original poster
Sep 10, 2010
112
39
In Mojave, I was able to "move" the Desktop folder to my Dropbox folder, then create a symlink back to it. It's been working fine for years.

i.e. create the Desktop folder in Dropbox
Delete it from my home folder
do the command: ln -s ~/Dropbox/Desktop\ Folder ~/Desktop\ Folder

Big Sur seems to have additional protection or something that overwrites my Symlink with a fresh ~/Desktop Folder. I've even tried to do this while logged in as a different user, but no matter what I do, when I reboot, my Symlink gets overwritten.

Is there still a way to accomplish this?
 

xander09

macrumors member
Mar 15, 2018
65
115
Hey @edjusted! I was running into the same issue setting up my new M1 Mini on Big Sur (coming from High Sierra). I have a very large user folder, but wanted to use external storage for most of it, rather than paying Apple's SSD upgrade prices. I was frustrated that the old symbolic link approach I've been using for years didn't work. This discussion on the Apple Support Communities helped me figure out a workaround. Basically, iCloud Drive creates new folders as it needs them to be for "Desktop and Documents" sync to work. If you disable iCloud Drive, the symlinks will persist. But if you want to use iCloud Drive but don't use that feature, you can temporarily disable iCloud Drive, create the symlink, lock the symlink, and reactivate iCloud Drive. The symlink will persist.

I imagine there are other ways to do this, but this worked for me. Note, in my case, I was making a symlink to the Documents folder on an external drive, but I think the process may work for your use case too, and have adjusted the steps accordingly. And as ever, be super careful in terminal, particularly with the rm command. Anybody else following along, make a backup of your data first, and disconnect it from the computer when messing around with user accounts!

1) Log out of iCloud Drive (Settings ->Apple ID -> iCloud) on the user account you want to create the Documents symlink.
2) Create a second admin user account, if you haven't already.
3) Log out of the account in which you want to create the symlink, and log into the second admin account.
4) In Terminal, cd to the user account where you want to create the symlink: cd /Users/yourusername
5) *Delete protected folder*. In Terminal: sudo rm -rf /Desktop\ Folder
6) *Create symlink to source folder*. In Terminal: sudo ln -s /Dropbox/Desktop\ Folder
7) *Lock the symlink. This will keep iCloud Drive from overwriting it when/if you reactivate it.* sudo chflags -h uchg /Desktop\ Folder
8) Log out/restart. (I restarted because… why not?)
9) Log in to the account where you created the symlink. Confirm that the symlink is working as expected, and that it is in fact locked (locked icon in your user home directory, or Get Info on ~/Desktop and confirm that locked is checked).
10) Turn iCloud Drive back on. Check to see that the symlink hasn't been replaced with a new Desktop folder.
11) Restart to confirm that the symlink persists.

Hope this helps!
 

BabblingBafoon

macrumors newbie
Jan 19, 2018
8
4
Hey @edjusted! I was running into the same issue setting up my new M1 Mini on Big Sur (coming from High Sierra). I have a very large user folder, but wanted to use external storage for most of it, rather than paying Apple's SSD upgrade prices. I was frustrated that the old symbolic link approach I've been using for years didn't work. This discussion on the Apple Support Communities helped me figure out a workaround. Basically, iCloud Drive creates new folders as it needs them to be for "Desktop and Documents" sync to work. If you disable iCloud Drive, the symlinks will persist. But if you want to use iCloud Drive but don't use that feature, you can temporarily disable iCloud Drive, create the symlink, lock the symlink, and reactivate iCloud Drive. The symlink will persist.

I imagine there are other ways to do this, but this worked for me. Note, in my case, I was making a symlink to the Documents folder on an external drive, but I think the process may work for your use case too, and have adjusted the steps accordingly. And as ever, be super careful in terminal, particularly with the rm command. Anybody else following along, make a backup of your data first, and disconnect it from the computer when messing around with user accounts!

1) Log out of iCloud Drive (Settings ->Apple ID -> iCloud) on the user account you want to create the Documents symlink.
2) Create a second admin user account, if you haven't already.
3) Log out of the account in which you want to create the symlink, and log into the second admin account.
4) In Terminal, cd to the user account where you want to create the symlink: cd /Users/yourusername
5) *Delete protected folder*. In Terminal: sudo rm -rf /Desktop\ Folder
6) *Create symlink to source folder*. In Terminal: sudo ln -s /Dropbox/Desktop\ Folder
7) *Lock the symlink. This will keep iCloud Drive from overwriting it when/if you reactivate it.* sudo chflags -h uchg /Desktop\ Folder
8) Log out/restart. (I restarted because… why not?)
9) Log in to the account where you created the symlink. Confirm that the symlink is working as expected, and that it is in fact locked (locked icon in your user home directory, or Get Info on ~/Desktop and confirm that locked is checked).
10) Turn iCloud Drive back on. Check to see that the symlink hasn't been replaced with a new Desktop folder.
11) Restart to confirm that the symlink persists.

Hope this helps!
First off, thanks SO much for sharing this! However, aren't you missing a path statement in step #6? I apologize for the question as I am not that savvy on symlinks, but I thought you *had* to have two paths when creating a symlink. For example: sudo ln -s /the/path/you/want /the/original/path

Am I incorrect in this? Is it because you are already in the directory where the symlink will reside?
 

xander09

macrumors member
Mar 15, 2018
65
115
Hi
First off, thanks SO much for sharing this! However, aren't you missing a path statement in step #6? I apologize for the question as I am not that savvy on symlinks, but I thought you *had* to have two paths when creating a symlink. For example: sudo ln -s /the/path/you/want /the/original/path

Am I incorrect in this? Is it because you are already in the directory where the symlink will reside?
You're welcome! If you're already cd'd in the directory where you want the symlink to be created then you don't need to list both paths in the ln -s command, just the path to the directory you want symlinked to the user folder.
 

BabblingBafoon

macrumors newbie
Jan 19, 2018
8
4
Hi

You're welcome! If you're already cd'd in the directory where you want the symlink to be created then you don't need to list both paths in the ln -s command, just the path to the directory you want symlinked to the user folder.
That makes sense. I also think the part that I wasn’t thinking through was that the destination folder’s name is what the symlink will show as. For some reason I was thinking you could sort of name that, but it will always be the destination folder name. So that folder name needs to match whatever will be expected.

Also, I think Apple may have made this more difficult to do on their M1 Macs, which is what I have now.
 

xander09

macrumors member
Mar 15, 2018
65
115
It was in setting up a M1 mini that I ran into the Documents symlink issue. This is the only machine I've used with Big Sur, so I can't say for sure if it's harder on M1, but I suspect that it's equally challenging on Intel Macs. I think Apple are protecting against sync or data loss issues with the iCloud Drive "Desktop & Documents Folders" feature. Which makes sense, but it sure made skimping out on internal storage and using an external SSD more cumbersome than I'd anticipated.
 

Jiojimbo

macrumors newbie
Mar 4, 2013
4
0
Hey Guys I have been reading your conversation aswell as other forum strying to solve this same problem, in my case im trying to link desktop and documents to an external hard drive to no avail (im on big sur , m1 SOC) . I was pretty confortable with symlinks before, but now im totally clueless. Could you recreate your intructions, but pointing to and external hard drive ? Also have you seen the docuemntation about "synthetic" symlinks? https://derflounder.wordpress.com/2...ctories-and-symbolic-links-on-macos-catalina/

Any help would be very appreciated. Thanks!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.