Search code examples
phpapachelampchmod

Website only works if all files are world readable


Hi I configured LAMP in my local host in UBUNTU, i made all my php files only readable, writable by me. But it only shows a blank page when accessed from a browser i checked my apache error log, and i saw it permission to process the scripts was denied. After changing the the permissions for all the php files to be world readable, the website seems to work fine. Any idea, how I can fix this.


Solution

  • Find out which user is running the apache ('www', or 'apache', or 'www-data', etc):

    Then issue:

    chown www:www /home/path/to/your/php/files
    

    Thus making them belong to apache (not you/root/world)