Problem with Joomla on Knownhost VPS

I have purchased a vsp and used the migration tool in the cpanel to migrate all the accounts over from Host Gator (HG) to knownhost. When I try and edit a feature in joomla like Search Engine Friendly URLs joomla comes back and says could not write to configuration.php. So I checked the permissions and they are the same as the host gator account. So I tried updating joomla from 2.5.7 to 2.5.11 using a manual download of the update and it say failure to write to temp folder. Ican not upgrade joomla using the upgrade feature under the components tab. Again permissions the same. So I terminated the account on knownhost and tried to move it again from HG to KH using the cpanel migration tool. It showed to be successful, but I get the same result. So I took a backup (akeeba backup) and moved it via FTP to KH from the HG server extracted it, and went through the setup and when I get to the end it says cannot write the configuration.php file. Manually create configuration.php and copy the texts below to that file before visiting your site. but that doesnt work either. Also at the end of the akeeba resinstall it gives you an option to remove the installation folder that akeeba uses to reinstall the with. If you click yes it says it does it, but the folder is still there. you have to manually remove it.

Also when I go to edit a module after its moved to KN, it all messed up, most of the editing options are gone. Ill post a pic below.


this is the way it should look.
correct module.jpg

This is not right.
broke module.jpg


Is there something I’m missing? Once I get this corrected I can change my ip for the name servers and get away from hostgator.
 
Vincent,

This is a pretty common "issue". The culprit is the PHP handler. Your HostGator account is using what's called suPHP, while by default our VPSs use DSO for it's performance benefits.

suPHP is more secure for a shared hosting environment, and allows things such as in place file writes from PHP scripts to work without having to set permissions to 777, which is insecure for webservers.

If you just open up a support ticket with us, we can quickly and easily swap this for you and get all of these minor issues taken care of for you by swapping the PHP handler to suPHP.
https://www.knownhost.com
Need a trusted provider for your VPS? Buy from KnownHost today for total peace of mind.
 
So this can't be right!!!
A question is asked at 5:10 a response and how to fix/we will fix it for you is posted at 5:14
Just amazing keep up the GOOD WORK KH something like this would have taken 6 to 8 hours, 1/2 dozen emails and a phone call to HG to fix I know I've been there.

Dave G
 
So this can't be right!!!
A question is asked at 5:10 a response and how to fix/we will fix it for you is posted at 5:14
Just amazing keep up the GOOD WORK KH something like this would have taken 6 to 8 hours, 1/2 dozen emails and a phone call to HG to fix I know I've been there.

Dave G


Glad to hear you are happy with our service :) We will always try to continually impress you!
 
I am having a very similar issue attempting to restore a backup of a Joomla site using Akeeba Backup. I submitted a ticket but was told that KnownHost suggests staying with DSO. I hate to make the switch as DSO appears to be more secure and faster.

However, I use the Akeeba backup utility quite often, it will be very difficult to go back to the days of manual backups and restoration on my websites.

Does anyone have an alternative suggestion? Does anyone know if it's possible to restore an Akeeba backup while using DSO PHPhandler?

https://www.akeebabackup.com/suppor...r-should-be-set-to-dso-suphp-cgi-or-none.html

Vincent,

This is a pretty common "issue". The culprit is the PHP handler. Your HostGator account is using what's called suPHP, while by default our VPSs use DSO for it's performance benefits.

suPHP is more secure for a shared hosting environment, and allows things such as in place file writes from PHP scripts to work without having to set permissions to 777, which is insecure for webservers.

If you just open up a support ticket with us, we can quickly and easily swap this for you and get all of these minor issues taken care of for you by swapping the PHP handler to suPHP.
 
Hi quantumottle,

I think you have part of it backwards as suPHP is more secure than DSO because you can run tighter permissions but, yes, it is slower. How much slower is really the question. I never even notice it on my VPS and unless yours is very heavily trafficked I don't think you would either. It's a very easy switch to do.

In WHM go to Service Configuration | Configure PHP and suEXEC. The top chart shows you what you are currently running and in the bottom chart you make your selections. For PHP 5 handler select suPHP and for Apache suEXEC select on then hit the button for Save new configuration. Once it's done you should be good to go.

If you want to stick with DSO you will have to chown all of the files and change permissions on some directories which is what KH support is talking about there.

I'm confused about your question about your backups though. Once you have things running on DSO you should be able to do backups and restores just fine as the files/directories will be backed up with the new permissions then.
 
Thanks for the info Dan.

This may sound ridiculous but I have to ask... It appears Akeeba doesn't play nice with DSO. So, is it possible to change my PHP handler to suPHP long enough to run the Akeeba installation script, then change back to DSO afterwards? Or is that a bad idea?
 
Unfortunately there's more to it than just that such as the ownerships and permissions. Theoretically I would say sure you can do that but I personally would be leery of doing it repeatedly. It will only take it screwing up once to make for a very bad day LOL
 
Thanks again Dan.

Obviously, I've got a very difficult decision to make. I'll keep researching this topic to find out what others who run Joomla based sites at KnownHost are doing. I can't be the only person to discover their automated scripts are not compatible with DSO.
 
When I moved my 40 some odd customer's web sites from HG to KH, almost all Joomla based the first thing I did was change PHPhandler from DSO to suPHP and have never looked back. JMHO
 
I have a question about suPHP: does it matter if files are 644 or 664 ? Of for those who like alphabets, rw-r--r or rw-rw-r ? After KH installed suPHP on my VPS, the permissions for existing files were set to 644, as support advised would happen. But when I upload new files as a user (except root) they get 664. (To tell you the truth I don't know if that my sftp client doing that or the server.) Does it matter?
 
Hi kitchin,

I can't say that I have ever seen that happen. Files I upload get set to the correct permissions of 644. I've never seen an FTP client that would set the permissions either although I suppose it's possible. I'm fairly confident that the system you're uploading to (your VPS) sets the permissions after it's uploaded.

Does it matter? Not much I suppose as the owner and group are the same, however it's not right. I'd put a ticket in on it with a low priority as while everything works it's not assigning the proper permissions for some reason.

Just out of curiosity were all the files in question uploaded to the same directory? And what were it's permissions set to?
 
If fixed it in the client! Not sure if the client was causing the problem in the first place.
WinSCP: Option / Preferences / Transfer / Default / Set Permissions / rw-r--r-- (+x)

Dan, to answer your question, public_html, 755, or any 755 subdirectory. But if I uploaded as root, files got the proper 644.

And it actually was causing a problem. If a php file is 664 then it cannot write files:
Internal Server Error
File "/home/.../public_html/test.php" is writeable by group
suPHP 0.7.1​
 
I see what the problem is now...you're on DirectAdmin and not cPanel ;)

Seriously though, was it WinSCP setting that was setting the permissions wrong then? Personally I'd still put the ticket in too even though you've found a work around.
 
Not sure. I don't think I'll open a ticket since I already solved it. There's also this, for migrations and cleanups:

# chmod -R og-wX .
# chmod -R a+rX .

Removes ------w---w-, adds -r---r---r--, recursively. Sets all three x's iff user has x. Use with care of course. I wouldn't get near those commands outside of public_html.
 
Last edited:
Followup on SFTP setting the wrong file permissions. DirectAdmin has two choices for the FTP server daemon, plus the sshd daemon can do SFTP directly. When I replaced Pure-FTP with ProFTP as the server, for another reason, I no longer had this problem. ProFTP has the following line in its config:
Umask 022​
That's the magic that subtracts -w---w-
Now I can return my WinSCP client to default, which is good because otherwise it messes up stuff at other servers, where PHP needs 664 to write.

I like DirectAdmin but I'm getting involved in a lot of tweaks.
 
(Maybe what happened was that after the switch to SuPHP then DirectAdmin needed a rebuild to get the Umask right. When switching to ProFTP I did the rebuild.)
 
Top