Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache 403 error, (13)Permission denied: access to / denied, Fedora 16

Tags:

apache

fedora

I've just set up apache on my Fedora 16. And i can't get my vhosts working!

Though localhost/phpmyadmin works fine..

I got this in my httpd.conf

<Directory /home/renat/www>
AllowOverride All
Options +Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Directory>

NameVirtualHost *:80
<VirtualHost *:80>
    ServerName fabbro.fm
    DocumentRoot /home/renat/www/fabbro
</VirtualHost>

Everything is fine with permissions too:

    ls -l
    drwxr-xr-x. 32 renat renat 4096 янв.   7 16:12 www

And i've got 403 error when try to access fabbro.fm error_log says:

[client 127.0.0.1] (13)Permission denied: access to / denied

What do i have to do?

like image 981
mennanov Avatar asked Jan 11 '12 09:01

mennanov


People also ask

How do I fix 13 Permission denied?

The PermissionError: [errno 13] permission denied error occurs when you try to access a file from Python without having the necessary permissions. To fix this error, use the chmod or chown command to change the permissions of the file so that the right user and/or group can access the file.

How do I fix error 403 Forbidden in Apache?

When a user visits a URL that requests a directory, the web server looks for a file in the given directory. If the file or any similar files are not found, and directory index listings are disabled, the web server displays the '403 Forbidden' error message. To fix the issue, add a default directory index.

What is Permission denied Code 13?

(13) Permission Denied. Error 13 indicates a filesystem permissions problem. That is, Apache was denied access to a file or directory due to incorrect permissions. It does not, in general, imply a problem in the Apache configuration files.

How do I fix denied permissions?

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.


2 Answers

I solved this problem! Apache could not access those directories because of the SELinux security settings. All i had to do is to apply this command to the directory in the path to document root:

chcon -R -t httpd_sys_content_t
like image 79
mennanov Avatar answered Oct 02 '22 19:10

mennanov


I had a SELinux issue. I first tried chcon -t httpd_sys_content_t but that didn't fix it. After that I did setsebool -P httpd_read_user_content 1 and it worked. I don't know if the first command was necessary or only the second.

like image 24
Michael Munsey Avatar answered Oct 02 '22 18:10

Michael Munsey