Micfo.com, LLC. - Official Forums  

Go Back   Micfo.com, LLC. - Official Forums > Webhosting Services > Shared Web Hosting (Linux & cPanel)

Shared Web Hosting (Linux & cPanel) Discuss anything related to your cPanel or Linux shared web hosting account. (MG-Super, MG Special and MG Deluxe)

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-09-2007, 05:59 PM
Micfo Newbie
 
Join Date: Oct 2005
Posts: 13
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Blue Dot this Post!
Reply With Quote
  #2 (permalink)  
Old 09-10-2007, 07:27 AM
drachma's Avatar
Micfo Addict
 
Join Date: Jan 2005
Posts: 294
I do believe all servers nowadays should be using PhpSuEXEC. Therefore all your php files must be chmod 644 or 755. The chmod 777 (public read/write) no longer works to execute.

Please search this forum for PhpSuEXEC if you'd like more details.

Thanks.

ps - You can change to 644/755 using the filemanager in cpanel ~ or if it's a massive update, then contact support to have them chmod the entire directory if you don't have SSH shell access yourself.
__________________
Mike
Retired Forum Moderator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Blue Dot this Post!
Reply With Quote
  #3 (permalink)  
Old 09-10-2007, 10:09 AM
Micfo Newbie
 
Join Date: Oct 2005
Posts: 13
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Blue Dot this Post!
Reply With Quote
  #4 (permalink)  
Old 09-10-2007, 02:16 PM
drachma's Avatar
Micfo Addict
 
Join Date: Jan 2005
Posts: 294
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Blue Dot this Post!
Reply With Quote
  #5 (permalink)  
Old 09-10-2007, 07:37 PM
Technical Director
 
Join Date: Mar 2002
Posts: 687
Server Mitigration

Yes.

We just finished the last of the legacy servers recently over the weekend, so it is all running on phpsuexec now.
__________________
Russell Rademacher

Technical Director
Micfo.com, LLC.
www.micfo.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Blue Dot this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -8. The time now is 10:59 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0
Copyright © 2002-2009 Micfo.com, LLC. - All Rights Reserved.