Hello, I'm Alessandro Fiorotto of Tophost, a major Italian hosting provider that counts more than 80,000 active domain. I am writing to ask if it is possible that Drupal uses the Apache directive "SymLinksIfOwnerMatch" instead of "FollowSymLink".
This request stems from the fact that the directive "FollowSymLink" is highly unsuitable for a shared hosting. This is because another customer next to my website, could, with a simple symbolic link, see my settings.php file. In fact, if the customer "www.first.com" sees that another client," www.second.com", use Drupal, simply create a symbolic link on its home like the one below in order to see as a normal text file, a PHP file of another site.
lrwxrwxrwx 1 first.com first.com 48 2009-12-03 15:21 seefile.txt -> /home/sites/www.second.com/htdocs/sites/default/settings.php
Using "SymLinksIfOwnerMatch" instead of "FollowSymLink" avoids this problem, but unfortunately I found that Drupal does not work correctly with "SymLinksIfOwnerMatch".
The problem is solved in some way? you can do so you can activate the "clean URL" with "SymLinksIfOwnerMatch"?
Thank you for your attention and good day.
P.S. The Drupal Security Team has cleared this issue to be fixed publicly.
Comments
Comment #1
steff2009 commentedHello, this is a really critical issue!
I'm one of Tophost clients and, due to the security settings that they recently applied, our site today didn't work and all images, image galleries, etc. were gone.
The host informed us about the problem and gave us directions on how to temporarily solve it, but we had to disable "Clean URLs" and modify .htaccess.
Please try to help as soon as possible.
Thank you.
Comment #2
tophost commentedHi, I edit all Drupal ".htaccess" files and substitute "FollowSymLinks" with "SymLinksIfOwnerMatch".
For example, the file "/sites/default/files/.htaccess" was modified as follows:
BEFORE:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options + FollowSymLinks
AFTER:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options + SymLinksIfOwnerMatch
# Options + FollowSymLinks
Now everything seems ok.
Comment #3
steff2009 commentedIn most recent Drupal installation, the main .htaccess (the one that comes with the Drupal installer and goes in the htdocs directory), is already set like this:
The Rewrite engine must be on:
and with some hosts the Rewrite Base needs to be modified as follows:
Comment #4
fr34ck commentedHello, I understand you did it for security reasons, but warn users before, was not a bad idea! ;-)
I saw the site not working without understanding why!?!
I make the changes and now it works fine.
Ciao!
Comment #5
livebrain commentedWell i tried all the way but i am not getting is solved..
I have a website http://miteshfoods.com/shrigandhibakery/
When i hosted this website it was working fine.. and i had used the views rotator for the front page image gallery.
Now the Drupal writes its own .htaccess file but now my hosting company made the changes in the .htaccess file
""FollowSymlinks" with "SymlinkIfOwnerMatch" in .htaccess file." and after this change my website is not working perfectly ...
Can any body have the idea what is the wrong..
I have tried doing changes in the both the .htaccess file 1. at the root and other at sites/default/file/
Please help as ma hosting people are not able to give me the proper solutions..
and if remove this i get 500 Internal server Error
Comment #6
dpearcefl commentedDo you still need help with this issue?
Comment #7
dpearcefl commentedComment #8
kars-t commentedHi
I am closing this issue to clean up the issue queue. Feel free to reopen the issue if there is new information and the problem still resides. If not please make sure you close your issues that you don't need any more.
Maybe you can get support from the local user group. Please take a look at this list at groups.drupal.org.
Comment #10
francescosciamanna commentedHi,
I followed instructions from Tophost at this page and replacing
# Options +FollowSymLinkswithworking well only for the .htaccess in sites/default/files/. If I do the same for the .htaccess in Drupal root, the site stops working.
What is the correct way to do the job? Do we need to add the same lines to the .htaccess in Drupal root folder?
Thank you in advance for your kind reply