ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Apache installation - file owner & permissions?

    IT Discussion
    apache permissions php
    2
    3
    575
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1
      1337
      last edited by 1337

      I have Apache installed and it runs under the user www-data and the group www-data.
      This is a Debian install so html files are by default located under /var/www/html and that is also the document root in Apache.

      I was wondering what permission and owner should files like html, php etc have?

      Also where should php include files be located? Somewhere under the document root (for example /var/www/html/include or outside (like /var/www/include/) or somewhere else?

      scottalanmillerS 2 Replies Last reply Reply Quote 0
      • scottalanmillerS
        scottalanmiller @1337
        last edited by

        @Pete-S said in Apache installation - file owner & permissions?:

        Also where should php include files be located? Somewhere under the document root (for example /var/www/html/include or outside (like /var/www/include/) or somewhere else?

        Normally the structure is...

        /var/www/html/site-name/include/

        1 Reply Last reply Reply Quote 1
        • scottalanmillerS
          scottalanmiller @1337
          last edited by

          @Pete-S said in Apache installation - file owner & permissions?:

          I was wondering what permission and owner should files like html, php etc have?

          Normally you just do...

          chown www-data:www-data -R /var/www/html

          1 Reply Last reply Reply Quote 1
          • 1 / 1
          • First post
            Last post