I just installed Lion on my machine and I'm starting fresh. I thought I'd manually install an AMP stack on my machine. Also, I'm using my ~/Sites folder as my web root. However, now that everytime I update a file I'm being asked for my system password.

I think it's a permission problem except I'm not entirely sure what to do. Can someone help?

link|improve this question
This may also be better served on serverfault. – manyxcxi Aug 9 '11 at 16:15
feedback

migrated from stackoverflow.com Aug 10 '11 at 7:08

This question came from our site for professional and enthusiast programmers.

2 Answers

You can do a couple of things, but the basics will be chmod and chown. Chmod changes the permissions of the file or folder to allow rights on a user, group, and world access. Chown changes who owns the file or folder.

From the command line you could use chown -R to change ownership recursively for all files and subfiles to your username. Or, better yet, you could change the file permissions similarly using chmod -R.

In octal notation doing something like chmod -R 777 ~/Sites will make it readable, writeable, and executable by everyone on the machine (not necessarily the best way to go). chmod -R 755 would make it writable, executable to the owner and readable by everyone else. There's lots of examples and ways to do this.

You may want to look into users and groups to avoid making it all world executable, and not annoying you everytime you want to modify a file.

link|improve this answer
feedback

Try setting the folder permissions to 777 from the console:

chmod 777 <directory path>
link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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