Hi!

Let me start from the beginning. On Christmas day my company's website went down hard! The database got corrupted.

Murphy's law was at full strength on December 26th! After 9 hours of hard work I was able to reinstall the mysql-server and restore the database from a recent backup.

That's when my problems started. Boost stopped working. For some unknown reason my .htaccess and robot.txt files had reverted back to a previous version. After fixing that, I started getting another error message from boost saying that it couldn't update the cache folders!

I deleted the cache folders and allowed Boost to recreate them. That problem went away but I noticed something very weird. The files and folders being created by Boost are now owned by my user instead of the "apache" user.

I have no idea how it happened!

To close my day in a grand way, my boss started complaining that whenever he tried to save a node, he would get the following "406" error message:

Not Acceptable

An appropriate representation of the requested resource /node/2384/edit could not be found on this server.

Apache Server at www.example.com Port 80

I goggled around and always found the same suggestion to fix this error. I tried the following suggested solution with no success:

# Put this in your .htaccess file:
<IfModule mod_security.c>
  SecFilterEngine Off
</IfModule>

I got the feeling that, if I fix the problem with permissions that I have noticed on Boost, the other "406" error problem will go away.

I just don't know how to approach the problem.

Why would this problem happen just because I reinstalled mysql-server?

How could this affect the permissions on the website?

Where does Drupal get the user credentials that it uses when doing anything on the site?

How can I change this information to make Drupal get the credentials from the "Apache" user again?

Comments

drupalfever’s picture

By the way, my server configurations are:

  • CentOS 5
  • Apache 2
  • PHP 5.2.17
  • MySQL 5.0.95
  • Drupal 6.27
drupalfever’s picture

I found out that the Apache module that was enabled on my server was the version 2 of the Security Module. Therefore, I only needed to put the following on my ".htaccess" file:

# Put this in your .htaccess file:
<IfModule mod_security2.c>
  SecFilterEngine Off
</IfModule>

I still have the problem that Apache is using my user instead of the "apache" user when accessing files and folders on the site.

I had to change the permissions a little so the Drupal website would work properly but, unless I can figure out how to make "apache" use the appropriate credentials again, I will end up reinstalling Linux and everything else! :-(

vantastic’s picture

Thanks for documenting this.

I had the same error message appearing occurring on saving nodes. This happened on a site that was functioning perfectly well before, and I suspect a server update by the hosting provider caused it to begin malfunctioning.

Implementing the 'SecFilterEngine Off' line in .htaccess solved it.

Annanna’s picture

Hi,

I am facing the same issue, but in case of my website for some pages there is no problem, i can able to edit and save it. But several pages it showing the error. And i tried the solution you recommended. But its not resolved. Could you please recommend any other solution...

Thanks in advance
Ann