![]() |
|
|||||||
| Shared Web Hosting (Linux & cPanel) Discuss anything related to your cPanel or Linux shared web hosting account. (MG-Super, MG Special and MG Deluxe) |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
SMF Broken - Server Migrated now :(
Hi all,
Firstly: mods, please move this if it should be elsewhere, thanks. My site was on Las Vegas. At first, after the migration, my entire site had died. "500 Internal Server Error"'s every page load. I figured out pretty quickly that this was due to a .htaccess file that has been in my root directory for over a year. To be perfectly honest, I don't believe I ever created it, but anyway. So I've deleted the file and all is good again, until I look at my SMF forum. I'm still getting an internal server error. No problem, I can check the error log: "[2007-09-09 21:51:39]: error: file is writable by others: (/home/my_user_name/public_html/forum/index.php)" (Naturally the 'my_user_name' is different in the real error). So because the file is writable by others, apparently this script won't run anymore. For what it's worth, it seems as though SMF (when it gets the chance) will change the rights on various files so that it can easily self update. That is to say, even though I still have write access to the file, it has given the 'Apache' user write access so that it can update itself. Anyway, that error, while annoying, shouldn't be a massive problem. After all, I can just write a one-liner that will change the permissions on that file, right? Well, according to the error log: "PHP Warning: chmod() [<a href='function.chmod'>function.chmod</a>]: Operation not permitted in /home/my_user_name/public_html/forum/changeperms.php on line 2" So I can't run the index.php file because it is writable by others and the file is owned by Apache. But at the same time I can't run the chmod command (it has to be done via the Apache user because that's the owner) to fix the problem. So I'm stuck: I either delete the files and reupload, or leave it all to rot. Naturally the latter isn't really an option and the former sucks, too, because then I'll probably end up in the same situation eventually anyway. Does anyone have any other suggestions? |
|
|||
|
Thanks for the reply Mike.
For what it's worth, things have changed since I wrote that email. As I looked again, the user of that file had been changed to my account so NOW I can actually change the permissions. Funny, though, that the owner was Apache's 'nobody' ("99") for the approximately 48 hours after the migration, but only changed after I mentioned something here. I will assume that it takes that long for the permissions to be changed and NOT that someone went and changed them without mentioning it here (not that I mind them doing it, but it doesn't hurt to tell me ).Thanks for the mention of PhpSuEXEC, too. That is great news! Having heard that and having a quick read up on it, that would explain the problems I was getting with the .htaccess file to begin with, too. I don't want to whinge, but all of this would have been a lot easier for me if it was mentioned in the migration notice. I mean, it would have only taken another line: "Hey, by the way we'll be using PhpSuEXEC... read up on it so you can have a better guess when things break!" Then at least I could have been prepared and KNOWN what the problem was to begin with. Oh well, thankfully I was busy on the weekend anyway so only spent a few hours on it... But anyway, thanks again for the reply. |
|
||||
|
Hmm -- interesting indeed. I'm glad the permissions are fixed. I know cpanel has an auto script that fixes permissions -- perhaps it was a cron job that fixed it
![]() In terms of PhpSuExec, I had thought all micfo servers migrated to that almost a year ago...but I guess there must have been legacy systems that didn't have that change. I'm glad it worked out well now.
__________________
Mike Retired Forum Moderator |
|
|||
|
Server Mitigration
Yes.
We just finished the last of the legacy servers recently over the weekend, so it is all running on phpsuexec now. |