I just installed Apache, MySQL and PHP stack on my Mac but now everytime I alter a file the OS asks me for my system password? How can I stop this?

02
2013-08
  • racl101

    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?

  • Answers
  • manyxcxi

    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.

  • 8088

    Try setting the folder permissions to 777 from the console:

    chmod 777 <directory path>
    

  • Related Question

    osx - Mac OS X + Apache + Web Sharing
  • alexus

    I'm running Mac OS X (Snow Leopard) and I'm trying to use Eclipse PDT and I'd like to use "Web Sharing" built-in feature that basically runs Apache. I'm doing code change in PDT and I want to use Safari and be able to hit my own server ( localhost ) and access those files without manually copying them over from one folder to another. How do I do that? I've tried

    sudo vi /etc/apache2/users/alexus.conf

    and then adding /Alias although that didn't help, in fact as soon as I hit myself at http://localhost/~alexus/workspace seems like it crashed my apache, or else I'm doing something wrong, this is what I get in my logs...

    [Tue Sep 22 18:46:53 2009] [notice] caught SIGTERM, shutting down
    [Tue Sep 22 18:47:10 2009] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
    

  • Related Answers
  • alexus

    I'm not sure why was it crashing, but by adding following line into

    mbp:~ alexus$ grep ^Alias /etc/apache2/users/alexus.conf 
    Alias /~alexus/workspace    /Users/alexus/workspace
    mbp:~ alexus$ 
    

    did the trick...