Results 1 to 4 of 4

Thread: Apache permissions

  1. #1
    Join Date
    Aug 2011
    Beans
    39

    Apache permissions

    I have just set up Apache and got it working fine. I tried to add another folder to /var/www. but when i tried to open the file in chrome with http://localhost/darts/index.html. I got the message that Permission was denied as i dont have access to that file. Is there a way to allow permission or would i have to do what is in this wiki page.http://help.ubuntu.com/community/ApacheMySQLPHP

  2. #2
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,239
    Distro
    Kubuntu

    Re: Apache permissions

    What are the permissions set to on the folder and file??

    On my system, I set ownership to be root:root. Permissions on the directory is 755, and the file(s) would be 644.

  3. #3
    Join Date
    Sep 2006
    Beans
    7,366
    Distro
    Lubuntu Development Release

    Re: Apache permissions

    Are you talking about not having write permissions to the web server's document root? That's easy to fix.

    Code:
    sudo addgroup webmasters
    sudo chgrp -R webmasters /var/www
    
    sudo find /var/www -type d -exec chmod g=rwxs "{}" \;
    sudo find /var/www -type f -exec chmod g=rws  "{}" \;
    
    # repeat for each user:
    sudo gpasswd --add angus1964 webmasters
    Then log out and back in again for the group membership changes to take effect.

  4. #4
    Join Date
    Aug 2011
    Beans
    39

    Re: Apache permissions

    Thanks for quick reply, changing file permission to 644 made it work.

    Cheers

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •