MacOS – Creating symlinks in “~/Library/Application Support/minecraft” that point to Dropbox, but “the original item for ”[file]“ can’t be found.”

dropboxfindermacossymlink

The Background:
I use Dropbox to back up my minecraft worlds, configuration files, and various other folders (bin, launcher_profiles.json, mods, resourcepacks, saves, servers.dat, versions).
I put symbolic links in "~/Library/Application Support/minecraft" which point to the files and folders in Dropbox.

The Problem:
Ever since I upgraded to Yosemite, the symbolic links don't work anymore, giving the error "The operation can’t be completed because the original item for “[file]” can’t be found."
I can't think of any reason that the links wouldn't work anymore. Any help appreciated.

Running:
Dropbox 3.0.3
Mac OS X v10.10.1
Minecraft Launcher 1.5.3
Minecraft 1.8.1

Best Answer

Correction: 'sudo' was not the problem. I was using a bash script to link all the files automatically, which for some reason ends up creating symlinks that point to where they are created ('source file' is ignored and substituted with 'target file').

Screenshot of the 'target as source' problem

Basically what you end up with is a file that points to itself.

This problem doesn't happen when you type the command into the Terminal manually for each file. You also have to specify the full path to the file you are linking, which I didn't think I needed to. Not sure why, might be a bug with bash or OS X or whatever.

So, instead of:

ln -s saves ~/Library/Application\ Support/minecraft/saves

type (manually in Terminal):

ln -s ~/Dropbox/path/to/saves ~/Library/Application\ Support/minecraft/saves

Hope this helps anyone who is having the same problem.