Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to serve web pages from my Dropbox folder (at ~/Dropbox/Projects/MySite/) on Lion 1.7.2 using Apache. But all I get are 403 Forbidden errors.

I'm positive this has something to do with the permissions in that folder, because I can change the virtualhost directory to a page I've created at the command line with sudo and it works fine.

The pages that do work are owned by root:wheel. I've tried changing just the MySite folder to root:wheel, but to no avail. I'm worried that if I keep changing permissions up the directory tree I could mess something up.

How should I go about getting sites served from Dropbox?

share|improve this question
I spent an hour on the phone with a server admin friend and we were unable to fully resolve it. As a hack, we changed Apache's running user and group to match mine, so it has access to everything on my machine. Probably not a problem since this isn't a production server, but it would be nice to figure out how to let the _www user read my Dropbox folder. – Jordan Roher Dec 28 '11 at 22:11

Because Apache runs as a separate user, its not allowed to just stumble into your folders. You might want to read up on UNIX file permissions: but in this case the folder is probably either 755 or 775 which would be either Full for user, Read and Execute for Group and Others, or Full for User and Group and Read/Execute for others. Because Apache is a different user and you do not share a group in common, the folder would likely need to be 777 so that it can use it. This a bit of a messy fix and it might be easier for you to just symlink a folder that it can access into your Dropbox, maybe your ~/Sites folder?

share|improve this answer

The solution I found to this was to move the existing Sites folder aside...

sudo mv ~/Sites ~/Sites.old

Then create a symlink from the Dropbox folder with my files to Sites..

ln -s ~/Dropbox/Projects/MySite Sites

And lastly edit my USERNAME.conf file to allow Apache to follow the sym link. So, using whatever editor you are comfortable with, edit /etc/apache2/users/USERNAME.conf to change...

<Directory "/Users/USERNAME/Sites/">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all

To read...

<Directory "/Users/USERNAME/Sites/">
    Options Indexes MultiViews +FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all

Then restart Apache...

sudo apachectl restart

You should now be able to edit your files in Dropbox and have them served up using Apache.

Be aware, that using FollowSymLinks is a potential security risk, so shouldn't be used in a live/production environment.

share|improve this answer

My issue was slightly different: I needed to have a CGI script (well, Mason actually) to access a Dropbox folder with remotely changing info to update pages. But, Apache runs as user _www and is quite restricted. It cannot login, for example. (Don't make it able to login, even though you can!)

I setup a new account, group _www, add the new username to group _www. Then login as the new account, setup Dropbox for that account, be sure to chmod -R g+rx to make group-readable the Dropbox folders, and make the account auto-login on startup. Now there's a live Dropbox folder on your OS X that Apache can access, being _www, without logging on itself.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.