Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Operating System (http://www.mac-forums.com/forums/os-x-operating-system/)
-   -   File Vault vs Apache + Sites Folder (http://www.mac-forums.com/forums/os-x-operating-system/124952-file-vault-vs-apache-sites-folder.html)

davidsword 09-26-2008 11:23 PM

File Vault vs Apache + Sites Folder
 
I enabled filevault on my macbook, and all's been well (minus the fact I just ordered a G-Tech G-Drive because my macbook's 80 HD requires 120GB to backup now.) Except, I do a lot of work with php, and kept all my scripts in /localhost/~davidsword/, but now I'm getting the error

Forbidden
You don't have permission to access /~davidsword/ on this server.


I would just run out of /localhost/ but its not index'ed with spotlight which is a must.

I tried adding some virtual hosts but couldn't get any of them to display anything other than /localhost/..

permission on ~davidsword/sites/ is all r&w.....

Thanks in advance for any help!

Maul 09-30-2008 09:49 PM

I'm experiencing the same problem on my mac after upgrading from tiger to leopard. On tiger, I was able to access the localhost files in the ~name/Sites/ directory just fine. Now with the new OSX installed, I keep getting the "Forbidden You don't have permission to access..." I don't understand this denied access. How can I not have access with the Admin account? Am I missing something here?

ericgfx01 10-02-2008 03:35 PM

Grrr. I found the same problem. I am trying to teach myself php, and am so new, this is frustrating.
I did notice however that files I place into the Library>Webserver>Documents seem to load just fine.
What gives?

Jerry Merfeld 11-24-2008 03:53 AM

Try this...
 
Modify your httpd.conf so Apache will run as you.

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User yourusername
Group yourusergroup

...I sure hope this helps, it definitely worked for me.

davidsword 11-24-2008 04:00 AM

Thank you so much Jerry Merfeld! Works perfectly.

kdoc 11-24-2008 08:51 PM

Quote:

Originally Posted by Jerry Merfeld (Post 761166)
Modify your httpd.conf so Apache will run as you.

User yourusername
Group yourusergroup

Hi folks,

newbie question please. In Linux, user and group are stored in /etc/passwd and /etc/group respectively. However, I can't find my name in passwd and can't seem to find my name against any group in 'group'.

Where do I find that info on a MAC pls? (OS X 10.5.5)

I guess I should include the fact that I ask this in this thread, because I also have a filevault userdir and am attempting to get my webserver working.

Jerry Merfeld 11-24-2008 11:27 PM

use id (-- return user identity)
 
Executing 'id' (without the quotes) from the command prompt will display your user ID, groups, and group IDs.

$ id
uid=501(yourusername) gid=20(yourusergroup) groups=...,...,...

kdoc 11-25-2008 06:14 AM

Thanks Jerry.

Where does the MAC store this info on the filesystem as well pls? Which files?

Jerry Merfeld 11-26-2008 12:54 AM

NOTE: This information is not related to this thread but since I am a curious individual as well... here it is.

It's in the Directory Services local DB, which is another can of worms.

If you want to modify it, check out the manual pages on the Apple site for more info about the Directory Services Command Line utility (dscl).
Mac OS X Manual Page For dscl(1)

The location of the database? /var/db/dslocal/nodes/Default

kdoc 11-26-2008 06:38 AM

Thanks again.

K

rolfen 09-23-2009 06:36 PM

Quote:

Originally Posted by davidsword (Post 761168)
Thank you so much Jerry Merfeld! Works perfectly.

It breaks the multiuser philosophy, and its not good practice, nor is it very safe.

jsnwest 10-10-2009 09:13 AM

Quote:

Originally Posted by Jerry Merfeld (Post 761166)
Modify your httpd.conf so Apache will run as you.

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User yourusername
Group yourusergroup

...I sure hope this helps, it definitely worked for me.

I'm not sure if the following method is any safer but it worked for me and I haven't altered any system files.

Get Info on your home folder. In the "Ownership and..." pane, click the lock and authenticate if necessary. Give "everyone" "read-only" access. Leave the 'Ignore ownership...' box unchecked.

I have FileVault on. I assume it should work with FV off. Good Luck : ^ })

tweitz 11-19-2009 01:42 PM

Apple Recommends...
 
There is a support page on apple.com that addresses this problem as well,

Mac OS X 10.5: Web Sharing - "Forbidden 403" message appears instead of website content


All times are GMT -4. The time now is 10:31 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.