Page 1 of 1

Help Think I'm Hacked?

Posted: Sun Feb 18, 2007 4:53 am
by siringo
My blog is just coming up with a blank page and "include_error" on it. I've contacted my hosting tech support people but they haven't been much help.

I was running v1.01 s9y from memory. I checked my s9y mySQL db via the cPanel 'check db' option and it all passed ok. I can still see all the s9y files and folders when I ftp into my site.

I know I need to upgrade to the latest ver of s9y but I'm not sure where I should go from here????

And is there a 30 second no brain upgrade cheat sheet to upgrade s9y?

Thanks,
Matt.

Posted: Sun Feb 18, 2007 11:22 am
by d_cee
Hi Matt

take a look here http://www.s9y.org/11.html#A19 it should help you upgrade easily.

Dave

Posted: Mon Feb 19, 2007 12:42 am
by siringo
Thanks for that link Dave.

I can still see my s9y files, but when I go to view my index.php file it comes up with a page that says 'include error'.

Any idea what I can look for to try and fix this?

TIA.

Posted: Mon Feb 19, 2007 10:30 am
by siringo
Just wondering if I'm suffering from that 'include' exploit hack that was found late last year? If so, is there a fix for it????

I'm really lost here and have no idea where to start fixing this. :cry:

Posted: Mon Feb 19, 2007 10:59 am
by siringo
OK I've managed to get my blog back up. I'm adding all these posts in case they may help others with the same problem.

I found that serendipity_config_local.inc.php permissions were set to 700. I cahnged them to 744. Then I got an error about s9y not being able to write the templates_c folder. Its' permissions were set to 775, I changed them to 777. After doing this and refreshing my page, my blog re-appeared.

I'd like to know the correct permissions for these files and folders, so I can tighten up the security. :D :D

Posted: Tue Feb 20, 2007 11:16 am
by garvinhicking
Hi!

Hm, your error sounds as if your provider changed the apache ownership without telling you, and then your files could no longer be read/writte by the s9y application.

The file 'Serendipity_config_local.inc.php' only needs read and write privileges for the owner of the file, and the owner should be the webserver. The same applies to the 'templates_c' folder. So 700 and 700 would be right in a perfect world.

If the owner of those are your FTP user, you'd need something like 777. Unless your FTP user is in the same group than the webserver, in which case 770 would suffice.

Best regards,
Garvin

Posted: Tue Feb 20, 2007 10:45 pm
by siringo
garvinhicking wrote:Hi!

Hm, your error sounds as if your provider changed the apache ownership without telling you, and then your files could no longer be read/writte by the s9y application.

The file 'Serendipity_config_local.inc.php' only needs read and write privileges for the owner of the file, and the owner should be the webserver. The same applies to the 'templates_c' folder. So 700 and 700 would be right in a perfect world.

If the owner of those are your FTP user, you'd need something like 777. Unless your FTP user is in the same group than the webserver, in which case 770 would suffice.

Best regards,
Garvin
Yes that was what I was starting to think. How can I find out who the owner is of the files and folders?

Thanks for your help Garvin, much appreciated.

Posted: Tue Feb 20, 2007 11:03 pm
by judebert
If you have FTP access, just log in and look at the owner of the index.php file. Compare that to the owner of the files in the templates_c/ directory. The ones in the templates_c/ directory should be owned by the webserver, while the index.php should be owned by you.

Posted: Tue Feb 20, 2007 11:18 pm
by siringo
Hi Jude,

I use Cuteftp for ftp'ing. I looked at the files with that and the 'owner' is given a numerical value. From what I could see there are only 4 files in the templates_c folder that have a different number to all other files in the that folder and the index.php file.

So I'm guessing I own everything?

Posted: Fri Mar 02, 2007 3:23 am
by judebert
Those four files with a different owner confuse me. Numeric owners are fine; it's like saying "User number {whatever}" instead of "Dave" or "webserver".

If this were happening to me, I'd try deleting all the files in the templates_c/ directory. They'll be recreated the next time anyone visits your blog. Then I'd visit my blog to create the files. Then I'd see who owned the files in templates_c/.

My bet is that Garvin hit the nail on the head: your hosting company changed the owner of the webserver. Now Serendipity (which runs as that user) can't access its own files. Four of those templates_c/ files got created after the change.

Giving out user and group numbers won't compromise security, so if you can tell us what they are for the index.php, serendipity_config_local.inc.php, and files in the templates_c/ directory, we can tell you how to set your permissions. (If you feel uncomfortable with giving out the actual numbers, just add or subtract a little. So long as everything that matches still matches, we'll be fine.)