Tuesday, February 24, 2009

"blank page" issue in Round Cube

Perform  this command to upgrade Round Cube:-
/usr/local/cpanel/bin/update-roundcube --force

If you get database error,

just go to phpmyadmin and repair all round cube tables.

Monday, February 23, 2009

Quick understanding ownership and permissions in Linux

List all file and folder with permisson info:-
harith@cengkeh:~/test$ ls -lah
total 8.0K
drwxr-xr-x 2 harith harith 4.0K 2009-02-23 03:12 .
drwxr-xr-x 48 harith harith 4.0K 2009-02-23 03:12 ..
-rw-r--r-- 1 harith harith 0 2009-02-23 03:12 file1
-rw-r--r-- 1 harith harith 0 2009-02-23 03:12 file2
-rw-r--r-- 1 harith harith 0 2009-02-23 03:12 file3
harith@cengkeh:~/test$

Understanding file/folder permission:-
-                (rw-)          (rw-)          (r--)           1               Harith          Harith
|                  |                 |                 |
type            owner      group        others

Type of file (type)

d                — a directory/folder
-(dash)    — a regular file
l                 — a symbolic link to another program or file elsewhere on the system

r — file can be read
w — file can be written to
x — file can be executed (if it is a program)

Saturday, February 21, 2009

Get Public IP from Linux command

Just copy paste following command and hit enter:-




wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'



Result:-




harith@cengkeh:~$ wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
124.13.233.xxx
harith@cengkeh:~$



Other option is using curl :-




curl -s checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'



if you dont have curl, download by using following command:-




sudo apt-get install curl






Friday, February 20, 2009

ME-E5005 occurs when accessing or selecting a folder in web mail


  1. Open MEInstaller.exe to repair all Mail Enable file/folder permission.
    C:\Program files\Mail Enable\BIN\MEInstaller.exe

  2. Select action number 1 and press Execute

  3. Wait until it finish.

  4. Done.

Friday, February 06, 2009

How to do redirect page

How to do redirect page?

PHP
<?php
header("Location: http:/harithdawi.com/");
exit();
?>

ASP
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location","http://harithdawi.com/"
%>

ASP.NET
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://harithdawi.com/");
}
</script>

JAVA (JSP)

<%
response.setStatus(301);
response.setHeader( "Location", "
http://harithdawi.com/" );
response.setHeader( "Connection", "close" );
%>

.HTACCESS (redirect all from old domain to  new domain)

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://harithdawi.com/$1 [R=301,L]

JAVA SCRIPT
<script type="text/javascript">
<!--
window.location = "http://harithdawi.com/"
//-->
</script>

Unable to start apache after make some changes

Unable to start apache after make some changes? by default apache have config file syntax checking. You can execute below command to check you syntax.
# httpd -t
# httpd -S

If the syntax of the output will look like this:-
Syntax OK

it mean you configure correctly.

If the out put similar with this,
Syntax error on line 44 of /etc/apache/httpd.conf:
bla...bla...bla.....

correct the syntax and try start again:-
# vi +44 /etc/apache/httpd.conf

For more info ,check log file :-


tail -f /var/log/httpd-error.log

egrep -i 'warn|error' /var/log/httpd-error.log

Wednesday, February 04, 2009

How to make SYN flood (basic)

What is SYN flood?

A SYN flood is a form of denial-of-service attack in which an attacker sends a succession of SYN requests to a target's system. (read more)

Download hping (http://www.hping.org/)

Debian / ubuntu
#sudo apt-get install hping

Use this commnad to execute attack:-
sudo hping - -faster -S <ip address or domain name>

For batter result, get ethernet packet generator ( http://packeth.sourceforge.net/)