Setting up a symbolic link for Apache in OS X Lion

Today I was fixing my OS X installation that had been wiped out before and ran across a problem that I forgot about. I store the code for the TrustAuth website in Dropbox for convenience and sym linked it to the appropriate folder to run the site locally. Apache was giving me the error:

Symbolic link not allowed or link target not accessible: /Users/dan/Sites

What I forgot was that I had to do before was change the permissions on the Dropbox folder.

In order for Apache to follow the symbolic links not only does the option “FollowSymLinks” need to be set in the config but every directory along the path from “/” needs to have the execute bit set. My Dropbox directory did not have this set so I had to set it with:

$ chmod a+x ~/Dropbox

Once I changed that Apache could read the files just fine.

This entry was posted in Apache, Mac OS X Lion, PHP and tagged , , , . Bookmark the permalink.
  • 4islam

    Still didn’t work. Could it be the encryption issue?

  • Rikki Prince

    I just spent all evening messing with symlinks and apache conf, and this is what I was missing *sigh*

    Glad I eventually found your site. You have save my sanity!