News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Internal server error while installing mod

Started by Ricky., March 01, 2013, 10:45:16 AM

Previous topic - Next topic

Ricky.

Hi,

Though it may not look like server issue but I think its server, issue , I recently got a server running CentOS 6.3 , everything is fine, few others are working fine on it. I transferred a SMF forum to it and installed a theme from admin panel, went good..

Today when I tried installing mod , I was able to upload it , then it showed me list of edits and asked me ftp permission, I gave FTP details and verified, it says working. Then I pressed "Proceed" and after that keeps on loading and in the end I get:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request


I checked domain error log, found following:

Script timed out before returning headers: index.php, referer: http://domain.com/index.php?action=admin;area=packages;get;sa=upload

And when I try to see what files it is trying to modify : it shows:

QuoteSome of the files the package manager needs to modify are not writable. This needs to be changed by logging into FTP and using it to chmod or create the files and folders. Your FTP information may be temporarily cached for proper operation of the package manager. Note you can also do this manually using an FTP client - to view a list of the affected files please click here.
The following files need to made writable to continue installation: /home
/home
/home

So essentially it is trying to change permission of /home ....  :-\

Furthermore, this server has suPHP running, at some moment, /home/username permission was changed to group writable and got error , I have root access to this server hence fixed the permission..

So what I think, package manager is trying to change permission for wrong files..

How can I fix it, its driving me nuts .. !!!!


EDIT:
It looks like path issue but I have given full path, tried relative path but doesn't work..

emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

LiroyvH

You run cPanel right?

What's the TimeOut direct in Apache?
Apache Configuration > Global Configuration (in WHM..)
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Ricky.

@ema
There is no mod, only a new theme is installed..

@Liroy
It is DA

Secondly, when I tried to upload extracted files, it straight away modified permisssion of /home/username and suPHP gave me error that /home/username is writable.

And as said earlier , it is looking over wrong file, it is trying to modify /home and where I think lies problem.

Colin

Oh yeah if you use SUPHP and ask SMF to change the permissions it really screws it up.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

emanuele

Quote from: Ricky. on March 03, 2013, 02:22:49 AM
@ema
There is no mod, only a new theme is installed..
Sorry, I was absolutely not clear...
I wanted to ask if you have this issue with any mod or one in particular.


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Ricky.

Nope, mods are not installing, its with all.

Colin, I don't think suPHP is issue , smf simply check if its writable, and it is and then only changes permission but somehow it is looking for wrong folders and trying to change permission which never happens..

Herman's Mixen

suphp is a pain in the ass when its not good configured... also make sure your folders are set with right permissions main folder httpdocs or public html 750 underneath you can use 755 for all files / folders.... check your php.ini / mysql.cnf and your other configuration files if they are set up right....
Met vriendelijke groet, The Burglar!

 House Mixes | Mixcloud | Any Intelligent fool can make things bigger, more complex, and more violent.
It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Albert Einstein

Former Godfather of our dutch community ;)

LiroyvH

suPHP on itself is absolutely *not*  a pain in the ass and changing permissions through suPHP will work perfectly fine.
It's stuff like mod_security and suhosin that might if improperly configured give problems, but suPHP itself will work fine while you put chmod OK. The only reason when suPHP would screw up, if you put a wrong username:group in the apache VirtualHost...

Ricky, don't know where to find it in DirectAdmin, but do check the directive for apache's timeout still hehe :P
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Colin

"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Arantor

QuotesuPHP on itself is absolutely *not*  a pain in the ass

Read the whole quote, Core - it's fine when it's properly configured. When it's not properly configured, it thoroughly is a PITA. ;)

LiroyvH

But that's just it and what I meant :D The only thing you *really* have to configure (so what suPHP doesn't find out on it's own after compiling it, and next to that: most control panels do that only part for you!), is the user+group you want it to check the scripts running under for a virtualhost... Eg the line in httpd.conf that tells PHP which user:group the scripts *must* run under.
If you get that wrong... Yeah, well, perhaps shouldn't play with servers in the first place then and stay well away. :P Breaking suPHP on cPanel servers for example is almost beyond ridiculous to even achieve in the first place. :P

If you would say it for suhosin and/or mod_security: Agreed :) They can be a pile of sh** and annoying to configure it in such a way that nobody will ever encounter problems with it: but still offer security :P But suPHP? No wai. It's the one piece of software that in the years of being involved with backends: it never gave me any trouble and it's configuration is *so* easy that even with the slightest bit of knowledge it can be setup and configured. o0

Hence, I really am with Ricky on this one: I doubt, very much, it's suPHP causing the problem.
(Notteeeee: Unless he put the vh-path to be "/home", but if that were the case the site as a whole wouldn't normally be loading up.)
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

butch2k


Oldiesmann

What virtual path are you trying? It sounds like it should be /domainname.com/public_html/. I've never used DA though so I don't know entirely how it sets things up. It sounds like it's similar to cPanel except that each domain gets its own directory and public_html (in cPanel, everything is in /public_html for the main domain, and you specify the directory for each subdomain or addon domain when you add them in the control panel).
Michael Eshom
Christian Metal Fans

Ricky.

This issue is getting complicated . ..

Here are the latest observations:
@Liroy
DA maintains general config of httpd at : /etc/httpd/conf/extra/httpd-default.conf
Timeout was 60,
I tried 240 and instead of timeout, I get :
QuoteYou cannot download or install new packages because the Packages directory or one of the files in it are not writable!

However, /var/log/messages is logging this error continuously multiple times when I try to install mod :

Quotekernel:[1016560.129073] nf_ct_ftp: dropping packetIN= OUT=lo SRC=0000:0000:0000:0000:0000:0000:0000:0001 DST=0000:0000:0000:0000:0000:0000:0000:0001 LEN=436 TC=0 HOPLIMIT=64 FLOWLBL=0 PROTO=TCP SPT=21 DPT=40186 SEQ=1845996668 ACK=1022066861 WINDOW=265 RES=0x00 ACK PSH FIN URGP=0 OPT (0101080A3C92E6213C92816C)

Btw, I thought its firewall issue, but I  disabled firewall completely, flushed Iptables rules but It is ipv6 request which is not enabled on this system.

Now so we have two problems:
1. FTP packet being dropped (for localhost and most probably as there in IPV6  on this ssystem) however I can make ftp connection using ftp client to this system normally.
2. It is looking over wrong directory

I checked file permission form Admin-->Packages --> File permission
IT is showing all to Writable (chmod 705)

I am naive in IPv6 and don't want to mess it on live server, however on similar server running cPanel things are fine..
I can think of following solutions:...
Direct SMF to not to make IPV6 FTP connection.. but how ?
and after that look into directory location issue ..

LiroyvH

I guess you are telling FTP to connect to localhost, tell it to connect to 127.0.0.1 instead?
((U + C + I)x(10 − S)) / 20xAx1 / (1 − sin(F / 10))
President/CEO of Simple Machines - Server Manager
Please do not PM for support - anything else is usually OK.

Ricky.

Well,  I already tried that after making that post and infact used full domain and it was able to connect but this time it modified permission of
/home/UserName folder and resulted in suPHP error..

So, now it is that package manager is looking over wrong directory .

Colin

Quote from: Ricky. on March 05, 2013, 08:16:06 AM
Well,  I already tried that after making that post and infact used full domain and it was able to connect but this time it modified permission of
/home/UserName folder and resulted in suPHP error..

So, now it is that package manager is looking over wrong directory .

Exact same symptom I had if I remember correctly.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Ricky.

So you mean it is because of suPHP and not because the way package manager decide for  chmod ?

Colin

Quote from: Ricky. on March 05, 2013, 10:24:26 AM
So you mean it is because of suPHP and not because the way package manager decide for  chmod ?
Precisely.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Advertisement: