1

I have my computer on network, and whole homedir is mounted at login with CIFS. When I access http://localhost everything works fine, but when I access http://localhost/~user it fails.

# cat /etc/mtab
.....
//192.168.1.5/user/ /home/user cifs rw,mand 0 0


ls -l
...
drwxrwxrwx  37 user domain users         0 2011-12-22 09:12 public_html

The browser say:

Forbidden
You don't have permission to access /~lluisforns on this server.

And apache say

 cat /var/log/apache2/error.log
 [Thu Dec 22 18:19:09 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /~lluisforns denied

Any idea?

user1097726
  • 61
  • 1
  • 6

1 Answers1

4

Had the same issue, and it turned out to be an SELinux thing: SELinux has a setting that prevents httpd (apache) to follow CIFS links.

  1. To see if you have this issue:

    getsebool -a | grep httpd

you should see httpd_use_cifs --> on. if not, your in luck - this is your problem.

  1. To fix:

    setsebool httpd_use_cifs on

You may also decide to disable SELinux altogether (assuming you know the risk) - here is a link to one relevant page

Omri Spector
  • 2,431
  • 24
  • 22