Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've tried everything on the first 3 of 4 pages of Google plus everything else on server fault and nothing has worked, the error I get is as follows:

[crit] [client] (13)Permission denied: /var/www/html/multicraft/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

I've tried chmod 755 on /var/www/html/multicraft and recursively but nothing, no luck at all. Be aware that I do have SELinux installed on the server but that has never caused issues with this install before.

Here's the permissions for /var/www/html, output of ls -l:

total 8
-rw-r--r--. 1 root   root     20 Aug  5 15:07 info.php
drwxr-xr-x. 8 apache apache 4096 Aug  5 15:08 multicraft

And the output of /var/www/html/multicraft:

total 40
-rw-r--r--.  1 apache apache  560 Nov  9  2012 api.php
drwxr-xr-x.  2 apache apache 4096 Nov  9  2012 assets
drwxr-xr-x.  2 apache apache 4096 Nov  9  2012 css
-rwxr-xr-x.  1 apache apache 2550 Nov  9  2012 favicon.ico
drwxr-xr-x.  7 apache apache 4096 Nov  9  2012 images
-rw-r--r--.  1 apache apache  660 Nov  9  2012 index.php
-rw-r--r--.  1 apache apache  620 Nov  9  2012 install.php
drwxr-xr-x.  5 apache apache 4096 Nov  9  2012 net2ftp
drwxr-xr-x. 12 apache apache 4096 Nov  9  2012 protected
drwxr-xr-x.  5 apache apache 4096 Nov  9  2012 themes

And for /var/www/html/multicraft/.htaccess:

-rw-r--r--. 1 apache apache 451 Nov 9 2012 .htaccess

And finally the output of ls -lad / /var /var/www /var/www/html /var/www/html/multicraft:

dr-xr-xr-x. 22 root   root   4096 Aug  5 13:59 /
drwxrwxr-x. 21 root   root   4096 Aug  5 14:00 /var
drwxrwxr-x.  6 root   root   4096 Aug  5 13:21 /var/www
drwxrwxr-x.  3 apache apache 4096 Aug  5 15:08 /var/www/html
drwxrwxr-x.  8 apache apache 4096 Aug  5 15:08 /var/www/html/multicraft
share|improve this question
Could you show output of the # ls -lad / /var /var/www /var/www/html /var/www/html/multicraft (please add the output to the question) – ALex_hha Aug 5 '13 at 19:57
Added it to the question – Joshua Aug 5 '13 at 20:03
is there any messages in the /var/log/audit/audit.log? Also you could try do the trick su - apache --shell=/bin/bash & cat /var/www/html/multicraft/.htaccess – ALex_hha Aug 5 '13 at 20:12
@ALex_hha This is repeated a few times in the audit log file: – Joshua Aug 5 '13 at 20:19
@ALex_hha And that command correctly prints out the contents of the .htaccess file – Joshua Aug 5 '13 at 20:20
up vote 2 down vote accepted
type=AVC msg=audit(1375733894.906:43363): avc:  denied  { read } for  pid=11191 comm="httpd" 
"name=".htaccess" dev=dm-0 ino=2624761 scontext=unconfined_u:system_r:httpd_t:s0`
tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file

As I see from the output it seems that problem in selinux. You could temporally disable it and try again. Also you could try to get current context

# ls --context /var/www/html/multicraft/.htaccess
share|improve this answer
How might I disable it? The current context is: -rw-r--r--. apache apache unconfined_u:object_r:admin_home_t:s0 /var/www/html/multicraft/.htaccess – Joshua Aug 5 '13 at 20:38
Thank you very much, I was able to disable it with echo 0 >/selinux/enforce and it fixed the issue. – Joshua Aug 5 '13 at 20:45

To fix the issue, it is better to restorecon -Rvf /var/www/html/

I think it's not a good idea to disable SELinux, it can prevent many exploits and privilege escalations.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.