richard1966
asked on
Mac OS permission problem after installing PHP / Apache / MySql
I'm trying to setup a an Apache / MySql / PHP environment to develop dynamic websites. I've installed, and enabled and got working all of the components, edited and amended the httpd.conf and php.ini files as directed in both written material and following a Lynda.com tutorial.
This is my first attempt at doing this on a Mac. I've done this without problem on a Windows PC using Wamp but trying to get this working on my MacPro desktop.
The problem is when I open a browser to view a file in my local user sites folder, i.e. test.php that I get a permissions error.
**********
Forbidden
You don't have permission to access /~Richard/test.php on this server.
************
The url I try to goto is http://localhost/~Richard/test.php and this results in this 403 error.
Being a Mac newbie could someone please guide me as what I need to do to provide the right permissions on which folders and how best to set them to get this up and running. Thanks.
This is my first attempt at doing this on a Mac. I've done this without problem on a Windows PC using Wamp but trying to get this working on my MacPro desktop.
The problem is when I open a browser to view a file in my local user sites folder, i.e. test.php that I get a permissions error.
**********
Forbidden
You don't have permission to access /~Richard/test.php on this server.
************
The url I try to goto is http://localhost/~Richard/test.php and this results in this 403 error.
Being a Mac newbie could someone please guide me as what I need to do to provide the right permissions on which folders and how best to set them to get this up and running. Thanks.
You essentially just need to have read permissions to the world. So you need 755 for directories and 644 for files. You can do this using the chmod command line tool. (i.e. chmod 755 directory or chmod 644 filename).
Also, note that if you are trying to change the permissions of a file or directory that is not currently owned by your user (i.e. a system folder or file) then you may need to add a "sudo" to the beginning of the commands I listed above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you both for this - The Apple Support article nailed it straight away and the advise from my2eggs although not used to sort this was very good as well so thank you to you both.
Despite Mac been a a little more quirky to set up, it is so much better than a PC and that comes from someone who is a recent convert.
Thanks again!
Despite Mac been a a little more quirky to set up, it is so much better than a PC and that comes from someone who is a recent convert.
Thanks again!
ASKER
Asking the right question is key to getting an answer - what I should have stated in this question is the following - Web Sharing - "Forbidden 403" message appears instead of website content - thanks to the experts on here they were able to figure out what I needed to know.