Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52544 - net-www/apache2 does not set FollowSymLinks for cgi-bin, this breaks webapp-config
Summary: net-www/apache2 does not set FollowSymLinks for cgi-bin, this breaks webapp-c...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo Web Application Packages Maintainers
Depends on:
Blocks: 52119
  Show dependency tree
Reported: 2004-05-31 04:56 UTC by Tom Payne (RETIRED)
Modified: 2004-06-26 17:45 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Tom Payne (RETIRED) gentoo-dev 2004-05-31 04:56:32 UTC

CGI scripts installed by webapp-config in /var/www/localhost/cgi-bin fail to run with a 403 Forbidden error.


webapp-config "installs" files in /var/www/localhost/cgi-bin by symlinking them to /usr/share/webapps/$PN/$PV/hostroot/cgi-bin. However, by default apache2 refuses to follow symlinks in /var/www/localhost/cgi-bin, so it borks with a 403 error and this in the logs:
[Mon May 31 13:33:39 2004] [error] [client] Symbolic link not allowed: /var/www/localhost/cgi-bin/<script>


Enable FollowSymLinks for /var/www/localhost/cgi-bin in /etc/apache2/conf/commonapache2.conf

 ### This is intended for your world-accessible CGI programs.
 <Directory /var/www/localhost/cgi-bin>
     AllowOverride All
-    Options ExecCGI
+    Options ExecCGI FollowSymLinks
     <IfModule mod_access.c>
       Order allow,deny
       Allow from all

Problems with the solution:

This might be a (minor) security risk. But the alternative it is broken cgi-bin with webapp-config :-(
Comment 1 Tom Payne (RETIRED) gentoo-dev 2004-05-31 04:57:36 UTC

webapp-config 1.9-r3
apache 2.0.49-r2
Comment 2 Chuck Short (RETIRED) gentoo-dev 2004-06-02 12:18:30 UTC
This should be fixed in the next version of webapp-config. For now please add FollowSymlinks manually.

Comment 3 Tom Payne (RETIRED) gentoo-dev 2004-06-04 11:05:38 UTC
I'm reopening this bug so you can resolved it as FIXED when it's fixed -- it's not RESOLVED WONTFIX because you've just said you're going to fix it :-)

Re-opening it also allows bugs that depend on it to be notified when the fix is available.


Comment 4 Tom Payne (RETIRED) gentoo-dev 2004-06-04 11:06:30 UTC
Of course, it's web-apps, not apache-bugs who are going to fix it :-)
Comment 5 Stuart Herbert (RETIRED) gentoo-dev 2004-06-05 03:34:39 UTC
I'll be putting a ~x86 version of webapp-config-1.10 into Portage later tonight for testing purposes.  This now uses hard links by default, which should address this bug.

Best regards,
Comment 6 Stuart Herbert (RETIRED) gentoo-dev 2004-06-11 15:16:23 UTC

I've committed v1.10 of webapp-config, which no longer uses symlinks.  This should address your problem.

Please test, and let me know how you get on.

Best regards,
Comment 7 Stuart Herbert (RETIRED) gentoo-dev 2004-06-26 17:45:41 UTC
Closing old bug.