Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Sites Folder Permissions Problem

Greetings. I'm getting the "Forbidden - You don't have permission to access /~Matt/ on this server" when I try to access my Sites folder using Web Sharing. Apache is running and I can access the Apache Test Page, and I had no problem getting set up on another Mac in the house.

I've tried using some chmod commands I've seen here and on other forums. I've also reset permissions on my Home folder using my 10.5 startup disk, but still no go. Get Info for my Sites folder now says:

Matt (Me) Read & Write
wheel Read only
everyone Read only

In Terminal:

drwxr-xr-x+ 5 Matt wheel 170 May 1 07:34 Sites

I'm new to Terminal but I'm certainly willing to try changing permissions there if someone can help.

FYI, my other computer has the same Username and password as my laptop account, and I regularly mount my entire Home folder on the other machine (and vice-versa). Could this have screwed up my permissions? I haven't mounted in either direction since resetting permissions on the laptop, which has the problem.

Any help with this would be greatly appreciated.

Thanks

PowerBook G4 1.67, Mac OS X (10.5.6)

Posted on May 1, 2009 8:57 PM

Reply
5 replies

May 2, 2009 7:44 AM in response to Yonidass

To be able to access a user's files via "Web Sharing", permissions for "everyone" are required for the full path to the user's "Sites" folder. The permissions you indicated for your "Sites" folder are correct. You don't explicitly mention the permissions on your "home" folder - note that if you are using "FileVault", the default "correct" permissions will block access via "web sharing" (somebody concerned about the security of their files generally won't want to allow "everyone" access to any part of their "home" folder at all).

Apart from permissions issues, there is an apache configuration issue on systems upgraded to 10.5 from earlier versions of OS X, that apparently affects accounts that were present prior to the upgrade. The issue, and solution, are described here:
http://support.apple.com/kb/TA25038

Both issues generate the same "Forbidden You don't have permission to access /~username on this server." message.

May 2, 2009 8:24 AM in response to biovizier

Thanks for the suggestions biovizier. Permissions for my Home folder are the same as my Sites folder: Everyone is enabled. And I have never used File Vault. I tried creating a user.conf file as per the instructions on the link you provided and now I'm getting a "Safari can't connect to the server" error, though the Apache Test Page can still be reached. I'm baffled.

I'll keep trying.

Thanks again.

Sep 18, 2009 2:34 PM in response to Yonidass

If the problem is that of http://support.apple.com/kb/TA25038 then you can use this shell script I wrote to tell Apache to allow access. This forum software trims the indentation, but I think I've gotten all the special characters quoted correctly to pass through.





#! /bin/sh
\# Create web sharing conf file for the users specified as command-line parameters.
echo
for name in $*
do
if \[ -n "$name" \] ; then
echo creating $name.conf
cat > /tmp/$name$$.conf << END
<Directory "/Users/$name/Sites/">
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>
END
sudo mv /tmp/$name$$.conf /etc/apache2/users/$name.conf
sudo chown root:wheel /etc/apache2/users/$name.conf
fi
done

echo
echo "Restarting apache webserver."
sudo httpd -k restart
echo "Done."

Oct 10, 2009 5:47 AM in response to biovizier

I had identical symptoms after upgrading to SL. The Apple support article didn't work for me. My .conf file is ok. I've read that Filevault might be the problem but I don't want to disable it. Following biovizier, I checked into my home folder permissions via Get Info and gave everyone 'read only' permission. It works for me. Thanks biovizier! : ^ }) Does doing so render Filevault vulnerable? I left the 'Ignore ownership...' box unchecked.

Sites Folder Permissions Problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.