A Fix for Error 403 Permissions Errors in Leopard's Web Sharing

When I upgraded to Leopard, I found that web sharing no longer worked under the user account that I ported from Tiger. It did, however, work for all new users that I created.

A little research turned up a reason and a fix. It seems that the Migration Assistant doesn't move the appropriate configuration files to the correct folders under Leopard. The fix can be done in a few ways.

Before going further, shut down the web server by turning off Web Sharing in your System Preferences.

One way to get things running quickly is to copy a pre-existing configuration file. Depending on how you upgraded, that file may be on your Leopard volume at this path:
/private/etc/httpd/users/

If it's not there and if you've got your old Tiger volume available (you did make a bootable clone before upgrading, didn't you?) then you can find the old config file at this path on the Tiger volume:
/private/etc/httpd/users/

The file that you need is called something like [YourUserName].conf. Copy that file to your Leopard drive at this path:
/private/etc/apache2/users/

Those folders are ordinarily invisible, but you can navigate to them using the "Go To Folder" command in the Finder, <Command>+<Shift>+G.

Note that you will need to authenticate any changes that you make in the users folder with an admin password.

If you can't find the file, you can recreate it in the apache2 directory. Open TextEdit, make a new plain text document and paste this text in:

<Directory "/Users/[YourUserName]/Sites/">
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>

Make sure that you insert your short user name in the right place. (Hint: Those brackets ( [ ] ) are placeholders and don't really belong in there.) The user name is the same name that's used on your home folder. Save the file to your desktop with the name [YourUserName].conf and then copy it into the /private/etc/apache2/users/ directory.

I also ran PHP under Tiger. You should can enable PHP by editing a file at /etc/apache2/httpd.conf. The file is called "httpd.conf" and you need to uncomment a line in that file by removing the pound (#) sign from the beginning. The line looks like this:
#LoadModule php5_module libexec/apache2/libphp5.so

Special thanks to the folks on the Apple discussion boards for this one!

Posted by Andrew
November 03, 2007 01:41 PM



COMMENTS


| Post A Comment (0)