Monthly Archives: June 2009

Script used to correct permission of files after suphp

#!/bin/bash # For some stupid reason, cPanel screws up the directory permissions. chmod 755 /opt/suphp find /opt/suphp -type d -exec chmod 755 {} \; # Ensure that the permissions are sane and won’t cause a 500 error. for user in

Posted in Cpanel, Issues, Scripts, Server Security

Script used to find vulnerable php files

#!/bin/bash shellpattern=’r0nin|m0rtix|upl0ad|r57|c99|shellbot|phpshell|void\.ru|phpremoteview|directmail|bash_history|vulnscan|spymeta|raslan58′ for user in `/bin/ls /var/cpanel/users` do find /home/$user/public_html \( -name ‘*.php’ -o -name ‘*.cgi’ -o -name ‘*.inc’ \) -exec \ egrep -il “$shellpattern” {} \; done

Posted in Issues, Scripts, Server Security

Stats not working in Plesk

Create the following cron: ———————————————————————————————— 9,24,39,54  * * * * /usr/local/psa/admin/sbin/backupmng >/dev/null 2>&1 10 1 * * * /usr/local/psa/admin/sbin/statistics >/dev/null 2>&1 10 1 * * * /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=xxx.com ———————————————————————————————— and run the script for checking : /usr/local/psa/admin/sbin/statistics –calculate-one –domain-name=xxx.com

Posted in Issues, Plesk, Scripts, Third party softwares

Red5 installation

cd /root vi red5install copy paste the below script echo ” ” echo “Hello ,Please choose the RED5 version : (1,2,3 or 4)” echo ” ” echo “1. RED5 0.7.0″ echo “2. RED5 0.6.3″ echo “3. RED5 0.5 ” echo

Posted in General discussions, Scripts, Server Setup, Third party softwares

To block an IP range using Iptables

iptables -I INPUT -m iprange –src-range 192.168.1.10-192.168.1.13 -j DROP

Posted in General discussions, Issues, Server Security

Recompile Perl in Cpanel servers

To check what is the perl version on your system, use: perl -v This is perl, v5.8.7 built for i686-linux If you need to upgrade your perl installation without breaking your CPanel, please follow this method. wget http://layer1.cpanel.net/perl588installer.tar.gz tar xfz

Posted in Cpanel, General discussions, Issues, Server Setup

Redirect Loop in Cpanel servers

It seems the issue is in the .htaccess file creation: it looks like this: Code: RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^.*?$ “http\:\/\/domain\.com\/subdir” [R=301,L] instead of this: Code: RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST}

Posted in Cpanel, Issues
Blog Stats
  • 117,699 hits
Follow

Get every new post delivered to your Inbox.

Join 209 other followers