symlink in /var/www/html [closed]

asked 2014-02-13 13:24:04 -0500

neel gravatar image

updated 2014-02-13 13:27:58 -0500

mether gravatar image

I've a symlink /var/www/html/f2 -> /tmp/f2 But http://localhost/f2 is giving 403 Forbidden

$ ls -hal /var/www
total 16K
drwxr-xr-x.  4 root root   4.0K Feb  1 09:20 .
drwxr-xr-x. 21 root root   4.0K Feb 14  2014 ..
drwxr-xr-x.  2 root root   4.0K Oct 31 22:42 cgi-bin
drwxrwsr-x.  3 root apache 4.0K Feb 13 22:04 html

in /etc/httpd/conf/httpd.conf I've

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted

error_log say

[neel@kochi html]$ sudo tail /var/log/httpd/error_log
[Thu Feb 13 22:40:47.988558 2014] [core:notice] [pid 3971] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Thu Feb 13 22:40:47.990567 2014] [suexec:notice] [pid 3971] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00557: httpd: apr_sockaddr_info_get() failed for kochi
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Set the 'ServerName' directive globally to suppress this message
[Thu Feb 13 22:40:48.397993 2014] [auth_digest:notice] [pid 3971] AH01757: generating secret for digest authentication ...
[Thu Feb 13 22:40:48.399925 2014] [lbmethod_heartbeat:notice] [pid 3971] AH02282: No slotmem from mod_heartmonitor
[Thu Feb 13 22:40:48.452877 2014] [mpm_prefork:notice] [pid 3971] AH00163: Apache/2.4.6 (Fedora) PHP/5.5.8 configured -- resuming normal operations
[Thu Feb 13 22:40:48.452928 2014] [core:notice] [pid 3971] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Thu Feb 13 22:40:50.496512 2014] [core:error] [pid 3972] [client] AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/f2
[Thu Feb 13 22:53:39.658330 2014] [core:error] [pid 3973] [client] AH00037: Symbolic link not allowed or link target not accessible: /var/www/html/f2

I was trying to check selinux

[neel@kochi html]$ cat /selinux/enforce
cat: /selinux/enforce: No such file or directory
[neel@kochi html]$ sestatus 
SELinux status:                 enabled
SELinuxfs mount:                /sys/fs/selinux
SELinux root directory:         /etc/selinux
Loaded policy name:             targeted
Current mode:                   enforcing
Mode from config file:          enforcing
Policy MLS status:              enabled
Policy deny_unknown status:     allowed
Max kernel policy version:      28

I don't know whether my selinux is on or off. s there is no such file /selinux/enforce . But sestatus says its enabled.

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by FranciscoD_
close date 2014-02-13 21:29:32.241833