Unable to execute CGI or Perl script through httpd when using symbolic link
Issue
I have a symbolic link from the cgi-bin directory to my home directory where a Perl script lives.
[root@myhost ~]# ls -la /var/www/cgi-bin
lrwxrwxr-x 1 root root 31 Jan 28 14:59 test -> /home/redhat/my-cgi-bin/
And the contents of my-cgi-bin:
[root@myhost ~]# ls -la /home/redhat/my-cgi-bin
drwxrwxr-- 1 redhat redhat 4096 Jan 28 14:59 .
drwxrwxr-- 1 redhat redhat 4096 Jan 28 14:59 ..
drwxrwxr-x 1 redhat redhat 4096 Jan 28 14:59 hello.pl
I am using the default cgi-bin VirtualHost that comes with httpd (Added Options +FollowSymLinks
), it should be working but I receive the following error when I navigate to http://localhost/cgi-bin/test/hello.pl
in my browser I see the following error in my browser:
You don't have permission to access /cgi-bin/test/hello.pl on this server.
I also see the following error in my httpd error_log:
[Tue Jan 28 15:59:35 2015] [error] [client 127.0.0.1] Symbolic link not allowed or link target not accessible: /var/www/cgi-bin/test
Environment
- Red Hat Enterprise Linux (RHEL)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.