localhost/phpinfo.php

I had a similar problem but the reason was because I had just restored my files into www from a Windows NTFS backup drive.

Naturally, with NTFS we don’t have the same permissions of Ubuntu or any other Linux system.

Looking at the folders using nautilus showed incorrect owners and permissions.

How I fixed it…

  1. Took ownership of my /var/www folder and its contents by doing this: chown khalid -R /var/www
  2. Changed the mode of the www containing files like this: sudo chmod 644 -R /var/www
  3. If you still get errors, do this: gksudo nautilus. Then go into your /var/www folder and change the permissions to allow owner/group read/write and check the box to execute as program. Also apply this to the sub-folders.

NOTE: Never give 777 permissions to a web folder/file. That’s like keeping your front door key hanging in the front of your gate! However, if this is a machine that never sees the daylight of Internet, it shouldn’t be an issue.

2 thoughts on “localhost/phpinfo.php”

  1. This is really interesting, You are an overly skilled blogger.
    I have joined your feed and look forward to looking for
    extra of your wonderful post. Also, I’ve shared your site in my social
    networks

    Reply

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)