I had recently installed Apache, PHP and MySQL in Ubuntu. And copied the files I created to the var/www
directory. But when I open http://localhost
it is showing
Warning: Unknown: failed to open stream: Permission denied in Unknown on line 0
Fatal error: Unknown: Failed opening required '/var/www/index.php' (include_path='.:/usr/share/php:/usr/share/pear') in Unknown on line 0
How can I run my project normally? It was working fine in windows.
Right-click the file or folder, and then click Properties. Click the Security tab. Under Group or user names, click your name to see the permissions you have. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.
"Permission denied (publickey)" and "Authentication failed, permission denied" errors occur if: You're trying to connect using the wrong user name for your AMI. The file permissions within the operating system are incorrect on the instance. The incorrect SSH public key (.
Solution 1: Enable Password Authentication If you want to use a password to access the SSH server, a solution for fixing the Permission denied error is to enable password login in the sshd_config file. In the file, find the PasswordAuthentication line and make sure it ends with yes .
According to this article, you need to give read/execute permissions to Owner, Group, and Everyone.
Set permissions on the problem file to 777. Note, you should avoid doing this on a server that's accessible from the internet.
http://webomania.wordpress.com/2007/03/12/permission-denied-in-unknown-on-line-0/
To fix this problem, look at the line in your ErrorLog, to find out which folder it is trying to access. If a block already exists for that folder, make sure it is set to allow access as necessary. If not, add a block to your Apache configuration file, allowing access as required. See the example below for folder /usr/local/awstats/htdocs.
Order allow,deny Allow from all
for a complete reference, check the apache wiki
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With