Fixing File and Folder Permission on suPHP
Agustus 19, 2008
Just for my own note ![]()
After installing suPHP on server, execute :
find /home/*/public_html -type d -exec chmod 755 {} \;
This command fix all folder permission
find /home/*/public_html -name '*.php' -o -name '*.php[345]‘ -o -name ‘*.phtml’| xargs chmod -v 644
This command fix all file permission
#!/bin/bash
cd /var/cpanel/users
for user in *
do
chown -R $user.$user /home/$user/public_html/*
done
This script fix all ownership issue
Joomla Logged Out when Uploading Image
Juli 17, 2008
I got a strange behaviour with Joomla after I apply suhosin and suphp on my cPanel hosting server. When I upload image through Media Manager, suddenly Joomla logged out.
On error_log I see that it has something crashed with flash.
I found a simple solution for this problem. Just disable flash upload on Global Config >> System >> Enable Flash Uploader
Disable CoreDump on Apache with suPHP
Juni 30, 2008
The idea of limiting user’s vhost resource usage on Apache brings me to give the suPHP a try. suPHP makes PHP process owned by the owner it self, not “nobody” or apache user, enabling us to limit resource per vhost.
After setting up suPHP with rlimit rule per vhosts, I see that Rlimit really works. Apache kills all PHP execution that hit the Rlimit. So, basically we can have a containers that lock user’s PHP execution, thus preventing user to overload the server with buggy or highload type of PHP script.
But a new problem arised. When PHP execution killed, it generate coredump files. Coredump files are very useful to traceback any crash issues that occur during PHP execution. But I got them all over user’s directory, especially on user’s directory that have a highload type of PHP script. The size may vary from 1MB to 40MB (on my system). They eat up users space every time a greedy resource PHP execution killed. Read the rest of this entry »
Install Munin & RRDTool on cPanel Centos5
Juni 25, 2008
Installing Munin on a latest Centos 5 via WHM (cPanel) can be very painful (takes a long night googling for me.. lol). On my server (CENTOS Enterprise 5.2 x86_64) - under “Manage Plugin” menu on WHM, it shows : Can’t locate RRDs.pm.
First you have to install rrdtool, rrdtool-devel, and perl-rrdtool. Here’s how to install it (it works for me) :
wget http://dag.wieers.com/rpm/packages/rrdtool/perl-rrdtool-1.2.23-1.el5.rf.x86_64.rpm
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-devel-1.2.23-1.el5.rf.x86_64.rpm
wget http://dag.wieers.com/rpm/packages/rrdtool/rrdtool-1.2.23-1.el5.rf.x86_64.rpm
rpm -ivh rrdtool-1.2.23-1.el5.rf.x86_64.rpm rrdtool-devel-1.2.23-1.el5.rf.x86_64.rpm perl-rrdtool-1.2.23-1.el5.rf.x86_64.rpm
And now you’re ready to install Munin through WHM.
cPanelProxy No Longer Needed?
Juni 21, 2008
Recently I installed a new server with the latest cPanel release (cPanel 11.23.3-R25623) on Centos 5 64bit version. I notice that under “Tweak Setting” menu on WHM, there are new features that interesting :
Add proxy VirtualHost to httpd.conf to automatically redirect unconfigured cpanel, webmail, webdisk and whm subdomains to the correct port (requires mod_rewrite and mod_proxy)
Automatically create cpanel, webmail, webdisk and whm proxy subdomain DNS entries for new accounts. When this is initially enabled it will add appropriate proxy subdomain DNS entries to all existing accounts. (Use /scripts/proxydomains to reconfigure the DNS entries manually)
When I give a try on those feature, it did work. cPanel become accessible through common http port (80) (instead of port 2082) when we access http://cpanel.domainname.tld. It also work for webmail, WHM, and webdisk.
Meaning we probably dont need a cPanelProxy anymore.
Installing Fantastico on Centos5.1
Maret 27, 2008
Ok, first of all .. this article originaly posted on netenberg.com, but for me it will be much more easier if I write it my own on my blog.
Centos 5.1 comes with wget version that is not compatible with Fantastico. So you wont be able to install it or upgrade it. Here’s the step that you need to take to remove buggy version of wget and install a “good” one : Read the rest of this entry »
cPanelProxy Installation Howto
Januari 15, 2008
CPANEL and it’s interface (WHM and Webmail) by default use un-common port which is often blocked by local network policy. For example, CPANEL (non-https) uses port 2082, WHM uses port 2087, and webmail uses port 2095.
As stated on CPANEL.net FAQ, there’s no perfect solution for this at the moment, but there is a useable one by using cPanelProxy. Here’s how to install cPanelProxy on your server : Read the rest of this entry »
Deleting nouser Files - another CPANEL fault
September 9, 2007
Not many CPANEL server admin knows that when they delete user account, there are some of those user files that still left on the server. Because user has been deleted, so the files will be owned by nouser.
This can be a problem when your server is highly cycled (you add and delete users very frequently) because you can hit the system user limit. This means you cant create no more user on your system. Deleting user to add another one wont work. Read the rest of this entry »
Perl updates on CPANEL
September 9, 2007
Start about 2 days ago I got warning e-mail from CPANEL reminds me to upgrade Perl on few old installed servers. I paste the mail here in case I lost it
: Read the rest of this entry »
Add-On Domain Problem on CPANEL
September 8, 2007
I think Add-On has become a long time non-fixed bug on CPANEL. Sometimes it’s just disappeared from CPANEL. Or sometimes it behave with various symptoms :
- When user adding add-on domain and delete it and then re-adding it again, it will show error
- Or if the domain to be added was a single user account on the same server (even after being terminated) it cant be added
- Add-on just disappear after CPANEL update