This Morning on my shared hosting account, all my index.php files where modified and am using drupal. All my website started redirecting to porn sites and other advertising websites. this only happened if my clients use the search engine to come to my websites. i managed to modify all the index.php files and it stopped redirecting, how can i set permission to my files whiile using the old Linux shared hosting.
Can I suggest patching your drupal and any plugins/themes? Changing file permissions may cause more damage than good.
Hey -- Not sure if you fixed your problem, but I was just dealing with this exact problem today. It's got nothing to do with drupal. The way the spammers do it is they put a file called .htaccess in the root of your website, and that file redirects traffic coming in to the site from search engines to a malicious script that loads up spam. On my site, the malicious script was called associating-commander.php. I solved the problem by deleting that script and the .htaccess file. (You can do that using GoDaddy's file manager tool.) Hope this helps.