I run quite a few servers on my machine so I use symbolic links quite a bit. That lets me have the files in one place, but still be able to access them on my server in another place, etc etc. I don’t make these links very often and when I do I usually look up how, so I thought I’d just post something about it so I remember for next time.
Using Unix (or Mac OSX) it’s a simple process. First open your Terminal in Applications/Utilities and then write:
1 | ln -s /Location/of/fileorFolder /Location/of/alias/with/name/at/end |
ln for link, -s for symbolic, and the source and destination.
So an actual example of this is:
1 | ln -s ~/home/dev/ dev |
That created a link to the folder “dev” in the folder I was in.
If you’re still getting the error “Forbidden: You don’t have permission to access / on this server” or the 403 forbidden “Symbolic link not allowed or link target not accessible” it’s probably because of the permissions in the original folder (not the link). You can change those by navigating to them and typing:
1 | chmod 755 fileNameHere |
So if the filename path was home/Documents/fileNameHere, then you would do the chmod like this:
1 | chmod 755 /home/Documents |