web developer moving to linux

Discussion in 'Technical' started by mtaylor314, Nov 30, 2007.

  1. mtaylor314

    mtaylor314 New Member

    been a web developer for about 7 months and been getting more and more frustrated with windows. I have set up a LAMP system to develop some php web sites. No issues there. Using apache for Windows I can set up a web site at any directory as long as DocumentRoot was pointed there. I would change my lmhosts file for the servername and I'd be set. My problem is I need root privileges to edit anything under /var/www, which I prefer not to edit things with those privileges, and if I set my DocumentRoot to a directory in my user's folder, firefox says I don't have access to view "/". What is the best way to develop web sites with this set up?
     
  2. sjau

    sjau Local Meanie Moderator HowtoForge Supporter

    please paste the output of:

    Code:
    ls -al /var
    
    and



    Code:
    ls -al /var/www
    
    In order to to see permissions and ownerships
     
  3. DonQuichote

    DonQuichote New Member

    Apache runs the php files as a certain user (could be called "apache", depending on your setup). That user needs to be able to read the php files. Off course, you will need write permission. With this information, you can set the rights for any directory under /var/www

    the user "apache" (or whatever it is called) has a default group as well. If you make yourself member of that group, you can make every file user-writeable and group-readable and change the group ownership to that group.
     

Share This Page