<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Servers cPanel webhosting blog</title>
	<atom:link href="http://www.theperfectarts.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theperfectarts.com</link>
	<description>Basics cPanel tutorials / issue,mysql,php errors etc</description>
	<lastBuildDate>Fri, 18 May 2012 07:53:26 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>GETCONF command not working</title>
		<link>http://www.theperfectarts.com/2012/05/getconf-command-not-working/</link>
		<comments>http://www.theperfectarts.com/2012/05/getconf-command-not-working/#comments</comments>
		<pubDate>Fri, 18 May 2012 07:49:29 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2337</guid>
		<description><![CDATA[After upgrading the RPM on the server While using the GTECONF receiving the following error message. &#160; &#160; &#160; &#160; The above error message occur because glibc libraries are corrupted, to resolve the above error message run the following command from the shell but make sure that you have loggin in to the server as a [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;</script><br />
After upgrading the RPM on the server While using the GTECONF receiving the following error message.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* banner small */ google_ad_slot = "7551207214"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<div id="attachment_2338" class="wp-caption alignleft" style="width: 310px"><a href="http://www.theperfectarts.com/wp-content/uploads/2012/05/get_conf_issue.png"><img class="size-medium wp-image-2338" title="get_conf_issue" src="http://www.theperfectarts.com/wp-content/uploads/2012/05/get_conf_issue-300x35.png" alt="Getconf issue" width="300" height="35" /></a><p class="wp-caption-text">GETCONF command missing</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>The above error message occur because glibc libraries are corrupted, to resolve the above error message run the following command from the shell but make sure that you have loggin in to the server as a root user.</p>
<blockquote><p><strong>yum install glibc*</strong></p></blockquote>
<p>The above command update the <strong>&#8220;glibc-common&#8221; and &#8220;glibc-utils&#8221;</strong> Packages to repair the glibc libraries.Now run the command &#8220;getconf  LONG_BIT&#8221;, it will show you the following result.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* banner small */ google_ad_slot = "7551207214"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<div id="attachment_2340" class="wp-caption alignleft" style="width: 310px"><a href="http://www.theperfectarts.com/wp-content/uploads/2012/05/get_conf_result1.png"><img class="size-full wp-image-2340" title="get_conf_result" src="http://www.theperfectarts.com/wp-content/uploads/2012/05/get_conf_result1.png" alt="getconf  LONG_BIT" width="300" height="38" /></a><p class="wp-caption-text">getconf LONG_BIT result</p></div>
<p>&nbsp;</p>
<blockquote><p>&nbsp;</p></blockquote>
<p>&nbsp;</p>
<p>As per above server having 32 bit OS.</p>
<p><script type="text/javascript">// <![CDATA[
           google_ad_client = "ca-pub-1685490665026631"; /* Big images */ google_ad_slot = "0185136902"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<strong><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
      var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/getconf-command-not-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hide port for Ruby rail application</title>
		<link>http://www.theperfectarts.com/2012/05/hide-port-for-ruby-rail-application/</link>
		<comments>http://www.theperfectarts.com/2012/05/hide-port-for-ruby-rail-application/#comments</comments>
		<pubDate>Thu, 17 May 2012 16:21:00 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Tomcat/Ruby Rail]]></category>
		<category><![CDATA[disable port]]></category>
		<category><![CDATA[hide port]]></category>
		<category><![CDATA[Hide port for Ruby rail application]]></category>
		<category><![CDATA[hide ruby rail port in .htaccess]]></category>
		<category><![CDATA[ruby rail applocation port]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2330</guid>
		<description><![CDATA[Basically Ruby Rail application run on its own port therefore in the application, we have to use the respective application with the domain name, for example the Ruby rail application is configured on the port 3111 then we will browse it in the browser as http://yourdomainname.com:3111 By using the following simple code in the .htaccess, [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[</p>
<p>  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();</p>
<p>// ]]&gt;</script><br />
Basically Ruby Rail application run on its own port therefore in the application, we have to use the respective application with the domain name, for example the Ruby rail application is configured on the port 3111 then we will browse it in the browser as</p>
<p><strong>http://yourdomainname.com:3111</strong></p>
<p>By using the following simple code in the .htaccess, we can hide the Ruby rail application.</p>
<p><script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-1685490665026631";
/* Big banner */
google_ad_slot = "7006637961";
google_ad_width = 468;
google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>RewriteEngine on</strong></p>
<p><strong>RewriteCond %{HTTP_HOST} ^yourdomainname.com$ [OR]</strong><br />
<strong> RewriteCond %{HTTP_HOST} ^www.yourdomainname.com$</strong><br />
<strong> RewriteRule ^typo-5.0.3 http://127.0.0.1:3111%{REQUEST_URI} [P,QSA,L]</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
google_ad_client = "ca-pub-1685490665026631";
/* Big banner */
google_ad_slot = "7006637961";
google_ad_width = 468;
google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>If you have any query E-mail us&#8230;</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/hide-port-for-ruby-rail-application/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDOS attack solution part 2</title>
		<link>http://www.theperfectarts.com/2012/05/ddos-attack-solution-part-2/</link>
		<comments>http://www.theperfectarts.com/2012/05/ddos-attack-solution-part-2/#comments</comments>
		<pubDate>Thu, 17 May 2012 06:13:59 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[configure iptable for ddos]]></category>
		<category><![CDATA[ddos attack iptable rule]]></category>
		<category><![CDATA[iptable for ddos]]></category>
		<category><![CDATA[resolve ddos]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2316</guid>
		<description><![CDATA[In the last thread we have found out the DDOS initial stag and we have use the simple iptale command to stop the but if still facing the DDOS attack and then its better to add the iptable rule to block the DDOS ips by using the following iptable rules. iptables -A INPUT -p tcp &#8211;tcp-flags [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;</script><br />
In the last <a title="DDOS attacks basics" href="http://www.theperfectarts.com/2012/05/ddos-attack-solution/" target="_blank">thread </a>we have found out the DDOS initial stag and we have use the simple iptale command to stop the but if still facing the DDOS attack and then its better to add the iptable rule to block the DDOS ips by using the following iptable rules.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* banner small */ google_ad_slot = "7551207214"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>iptables -A INPUT -p tcp &#8211;tcp-flags ALL NONE -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags SYN,FIN SYN,FIN -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags SYN,RST SYN,RST -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags FIN,RST FIN,RST -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags ACK,FIN FIN -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags ACK,PSH PSH -j DROP </strong><br />
<strong>iptables -A INPUT -p tcp &#8211;tcp-flags ACK,URG URG -j DROP</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* banner small */ google_ad_slot = "7551207214"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>The above iptables rull will check the connection for &#8220;SYN,FIN SYN,FIN&#8221; flag an once IP address found out the firewall will block the ips. Monitor the iptable rules performance and if still having issue then refer to the following URL <strong>&#8220;DDOS attack solution part 3&#8243;</strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/ddos-attack-solution-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable Telnet on Windows Vista</title>
		<link>http://www.theperfectarts.com/2012/05/enable-telnet-on-windows-vista/</link>
		<comments>http://www.theperfectarts.com/2012/05/enable-telnet-on-windows-vista/#comments</comments>
		<pubDate>Wed, 16 May 2012 16:22:54 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Install server side software / script]]></category>
		<category><![CDATA[enable telnet on vista]]></category>
		<category><![CDATA[resolve vista telnet issue]]></category>
		<category><![CDATA[Telnet on Windows Vista]]></category>
		<category><![CDATA[vista microsoft telnet service]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2312</guid>
		<description><![CDATA[Basically by default,the Windows Vista won&#8217;t provide the Telnet service. The Telnet client is for the text based communication with remote server. We can install the Telnet by using the following steps: 1. Click Start then select Control Panel. 2. Select Programs and Features. 3. Select Turn Windows features on or off. 4. Select the [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;</script><br />
Basically by default,the Windows Vista won&#8217;t provide the Telnet service. The Telnet client is for the text based communication with remote server. We can install the Telnet by using the following steps:</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>1. Click Start then select Control Panel.</strong></p>
<p><strong>2. Select Programs and Features.</strong></p>
<p><strong>3. Select Turn Windows features on or off.</strong></p>
<p><strong>4. Select the Telnet Client option.</strong></p>
<p><strong>5. Click OK.</strong></p>
<p><strong>6. A new dialog box will be appear to confirm the installation. The Telnet client command should now be available now.</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/enable-telnet-on-windows-vista/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDOS attack solution</title>
		<link>http://www.theperfectarts.com/2012/05/ddos-attack-solution/</link>
		<comments>http://www.theperfectarts.com/2012/05/ddos-attack-solution/#comments</comments>
		<pubDate>Wed, 16 May 2012 14:16:06 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[DDOS attack]]></category>
		<category><![CDATA[solve DDOS attack]]></category>
		<category><![CDATA[understand DDOS]]></category>
		<category><![CDATA[what is DDOS]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2308</guid>
		<description><![CDATA[In a modern days because of heavy competition many time DDOS attacks occur on Servers to destroy the reputation of hosting company.The lack of DDOS attack understanding many time tech engineers are not able to understand the attack and only monitoring the server and RAM memory. In initial stage in DDOS attack, first check the [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
   var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
In a modern days because of heavy competition many time DDOS attacks occur on Servers to destroy the reputation of hosting company.The lack of DDOS attack understanding many time tech engineers are not able to understand the attack and only monitoring the server and RAM memory.</p>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>In initial stage in DDOS attack, first check the connection for Apache web server by using the following simple commands.</p>
<blockquote><p><strong>netstat -anp |grep &#8216;tcp\|udp&#8217; | awk &#8216;{print $5}&#8217; | cut -d: -f1 | sort | uniq -c | sort -n</strong></p>
<p><strong>netstat -anp |grep &#8216;tcp\|udp&#8217; | awk &#8216;{print $5}&#8217; | cut -d: -f1 | sort | uniq -c | sort -n | tail</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>If any ip having excessive connection to the server then block it in the server by using the following command.</p>
<blockquote><p><strong>iptables -A INPUT -s xx.xx.xx.xx -p tcp &#8211;dport 80 -j DROP<br />
iptables -A INPUT -s xx.xx.xx.xx drop</strong></p></blockquote>
<p>Now monitor the server for excessive connection ip for 10 to 15 minutes and block but if still you are facing the problem refer to the next part &#8220;<a title="IPTABLE rule for DDOS" href="http://www.theperfectarts.com/2012/05/ddos-attack-solution-part-2/" target="_blank">Secure Server From DDOS</a>&#8220;.</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/ddos-attack-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is a cron job?</title>
		<link>http://www.theperfectarts.com/2012/05/what-is-a-cron-job/</link>
		<comments>http://www.theperfectarts.com/2012/05/what-is-a-cron-job/#comments</comments>
		<pubDate>Tue, 15 May 2012 15:00:10 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Cron jobs issue]]></category>
		<category><![CDATA[check cron job status]]></category>
		<category><![CDATA[cron issue]]></category>
		<category><![CDATA[cron job defination]]></category>
		<category><![CDATA[cron not working]]></category>
		<category><![CDATA[explain cronjob]]></category>
		<category><![CDATA[resolve cron job issue]]></category>
		<category><![CDATA[start cron]]></category>
		<category><![CDATA[what is cron job]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2300</guid>
		<description><![CDATA[The cron job is allowed to run the command or script as per the schedule time as per requirement. A cron job is a scheduled task in the Linux flavor which executes after a certain time interval. For example the cron is used to generate the backup for mysql, hosting account or to send E-mails. [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"></p>
<p>  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();</p>
<p></script><br />
The cron job is allowed to run the command or script as per the schedule time as per requirement. A cron job is a scheduled task in the Linux flavor which executes after a certain time interval. For example the cron is used to generate the backup for mysql, hosting account or to send E-mails. By default the daemon process is configured for the cron job service, so that when ever server rebooted, crond service will started automatically and execute the cron as per the scheduled time. The cron service scans the file /etc/crontab every minute and it checks in an every line and once cron service triggers as per scheduled crons time/date information.<br />
If the time/date is equal, then the cron job command will be executed. The main configuration file for cron, /etc/crontab, contains the following lines.</p>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>root@[~]# cat /etc/crontab<br />
SHELL=/bin/bash<br />
PATH=/sbin:/bin:/usr/sbin:/usr/bin<br />
MAILTO=root<br />
HOME=/<br />
# For details see man 4 crontabs<br />
# Example of job definition:<br />
# .&#8212;&#8212;&#8212;&#8212;&#8212;- minute (0 &#8211; 59)<br />
# | .&#8212;&#8212;&#8212;&#8212;- hour (0 &#8211; 23)<br />
# | | .&#8212;&#8212;&#8212;- day of month (1 &#8211; 31)<br />
# | | | .&#8212;&#8212;- month (1 &#8211; 12) OR jan,feb,mar,apr &#8230;<br />
# | | | | .&#8212;- day of week (0 &#8211; 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat<br />
# | | | | |<br />
# * * * * * user-name command to be executed</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>If any reason the cron jobs are stopped to working the first check the service status of crond<br />
service by running the following commands</p>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>service crond status<br />
or<br />
/etc/init.d/crond status</strong></p></blockquote>
<p>If the crond service is stopped, then starts it by using the following command from the shell or<br />
from the whm.</p>
<blockquote><p><strong>service crond start<br />
or<br />
/etc/init.d/crond start</strong></p></blockquote>
<p>To list the cron jobs for the particular user refer to the command, it will show the cron set under<br />
the particular user with the detail of time and commands.</p>
<blockquote><p><strong>crontab -l -u user_name</strong></p></blockquote>
<p>To edit the cron jobs for the paricular user refer to the command</p>
<blockquote><p><strong>crontab -e -u username</strong></p></blockquote>
<p>Once cron job setup completed make sure that cron job is running without any problem. We can<br />
check the cron logs under the <strong>/var/log/cron</strong> file.</p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/what-is-a-cron-job/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Block traffic from single referrer</title>
		<link>http://www.theperfectarts.com/2012/05/block-traffic-from-single-referrer/</link>
		<comments>http://www.theperfectarts.com/2012/05/block-traffic-from-single-referrer/#comments</comments>
		<pubDate>Mon, 14 May 2012 05:09:37 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[add referrer]]></category>
		<category><![CDATA[block multiple referrer]]></category>
		<category><![CDATA[block single referrer]]></category>
		<category><![CDATA[disable multiple referrer]]></category>
		<category><![CDATA[disable single referrer]]></category>
		<category><![CDATA[how to block referrer]]></category>
		<category><![CDATA[referrer bandwidth usage issue]]></category>
		<category><![CDATA[referrer issue]]></category>
		<category><![CDATA[resolve referrer issue]]></category>
		<category><![CDATA[secure referrer]]></category>
		<category><![CDATA[stop referrer]]></category>
		<category><![CDATA[stop referrer from single site]]></category>
		<category><![CDATA[what is referrer]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2294</guid>
		<description><![CDATA[The traffic from the referrer is useful for sites rank and promotion but some time wrong referrer can cause the bandwidth and ddos attacks therefore its always better to block such spam referrer. We can block the single referrer by using the following code in the .htaccess file. The following code will disable the referrer from blocksinglereferrer.com RewriteEngine on # Options [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
   var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script><br />
The traffic from the referrer is useful for sites rank and promotion but some time wrong referrer can cause the bandwidth and ddos attacks therefore its always better to block such spam referrer. We can block the single referrer by using the following code in the .htaccess file.</p>
<p>The following code will disable the referrer from blocksinglereferrer.com</p>
<p><script type="text/javascript">// <![CDATA[
   google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>RewriteEngine on</strong><br />
<strong># Options +FollowSymlinks</strong><br />
<strong>RewriteCond %{HTTP_REFERER} blocksinglereferrer\.com [NC]</strong><br />
<strong>RewriteRule .* &#8211; [F]</strong></p></blockquote>
<p><script type="text/javascript">// <![CDATA[
   google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>If you are facing the problem from too many  referrer sites then you can refer to the following code.</p>
<blockquote><p><strong>RewriteEngine on</strong><br />
<strong># Options +FollowSymlinks</strong><br />
<strong>RewriteCond %{HTTP_REFERER} blocksinglereferrer\.com [NC,OR]</strong><br />
<strong>RewriteCond %{HTTP_REFERER} blocksinglereferrer1\.com</strong><br />
<strong>RewriteRule .* &#8211; [F]</strong></p></blockquote>
<p>In above code the referrer from  blocksinglereferrer.com and  blocksinglereferrer1.com disabled.</p>
<p>&nbsp;</p>
<p><script type="text/javascript">// <![CDATA[
           google_ad_client = "ca-pub-1685490665026631"; /* Big images */ google_ad_slot = "0185136902"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<strong><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
      var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/block-traffic-from-single-referrer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop .pl .cgi Script Execution From Browser</title>
		<link>http://www.theperfectarts.com/2012/05/stop-pl-cgi-script-execution-from-browser/</link>
		<comments>http://www.theperfectarts.com/2012/05/stop-pl-cgi-script-execution-from-browser/#comments</comments>
		<pubDate>Mon, 14 May 2012 04:09:35 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[disable Script Execution]]></category>
		<category><![CDATA[stop .cgi file]]></category>
		<category><![CDATA[stop .pl file]]></category>
		<category><![CDATA[Stop Script Execution]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2290</guid>
		<description><![CDATA[To secure the web content from the hacker by executing the .pl or .cgi script, we can refer to the following code under the .htaccess file, so that when ever hacker try to execute the .pl or .cgi script, the script will show the plain text content instead of scripts execution result. Create the simple [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;</script><br />
To secure the web content from the hacker by executing the .pl or .cgi script, we can refer to the following code under the .htaccess file, so that when ever hacker try to execute the .pl or .cgi script, the script will show the plain text content instead of scripts execution result.</p>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>Create the simple .htaccess file or use the existing .htaccess file present under the root of your domain and insert the following code.<br />
<script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<blockquote><p><strong>AddType text/plain .pl .cgi<br />
or<br />
Addhandler text/plain .pl .cgi</strong></p></blockquote>
<p>&nbsp;</p>
<p><script type="text/javascript">// <![CDATA[
          google_ad_client = "ca-pub-1685490665026631"; /* Big images */ google_ad_slot = "0185136902"; google_ad_width = 336; google_ad_height = 280;
// ]]&gt;</script><br />
<strong><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script><br />
<script type="text/javascript">// <![CDATA[
     var _gaq = _gaq || [];   _gaq.push(['_setAccount', 'UA-27772211-1']);   _gaq.push(['_trackPageview']);   (function() {     var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;     ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';     var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);   })();
// ]]&gt;</script></strong></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/stop-pl-cgi-script-execution-from-browser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql error &#8211; Acesss denied for the user to the database</title>
		<link>http://www.theperfectarts.com/2012/05/mysql-error-acesss-denied-for-the-user-to-the-database/</link>
		<comments>http://www.theperfectarts.com/2012/05/mysql-error-acesss-denied-for-the-user-to-the-database/#comments</comments>
		<pubDate>Fri, 11 May 2012 14:46:21 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Mysql + phpmyadmin]]></category>
		<category><![CDATA[Acesss denied for the user to the database]]></category>
		<category><![CDATA[assign mysql user to mysql database]]></category>
		<category><![CDATA[assign privilege for Mysql database user to database]]></category>
		<category><![CDATA[mysql database error]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2280</guid>
		<description><![CDATA[The &#8220;Acesss denied for the user to the database&#8221; is a very common Mysql error. The Mysql error is occur due to the Mysql database username is not bind to the Mysql database therefore &#8220;Acesss denied for the user to the database&#8221; is occur.As soon as we create the MySQL database user then we will [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript">// <![CDATA[
  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
// ]]&gt;</script><br />
The &#8220;Acesss denied for the user to the database&#8221; is a very common Mysql error. The Mysql error is occur due to the Mysql database username is not bind to the Mysql database therefore &#8220;Acesss denied for the user to the database&#8221; is occur.As soon as we create the MySQL database user then we will need to be given a privilege to access the specific databases to the newly created Mysql database user. Refer to the following steps to assign the privilege for Mysql database user to connect specific Mysql database.</p>
<p>Steps<br />
1 Click on the Mysql icon above the words MySQL Databases on the cPanel main screen interface.</p>
<p>2 Select the Mysql Database user you want to grant privilege/ permissions from the drop box next to &#8220;Add User To Database&#8221; section:<br />
<script type="text/javascript">// <![CDATA[
 google_ad_client = "ca-pub-1685490665026631"; /* Big banner */ google_ad_slot = "7006637961"; google_ad_width = 468; google_ad_height = 60;
// ]]&gt;</script><br />
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>3 Select the privileges which you want to grant the user to have by checking the box next to the privilege&#8217;s name.</p>
<div id="attachment_2281" class="wp-caption alignleft" style="width: 310px"><a href="http://www.theperfectarts.com/wp-content/uploads/2012/05/mysql_privileges.png"><img class="size-medium wp-image-2281" title="Mysql Privileges" src="http://www.theperfectarts.com/wp-content/uploads/2012/05/mysql_privileges-300x188.png" alt="Mysql Privileges" width="300" height="188" /></a><p class="wp-caption-text">Mysql Privileges</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><script type="text/javascript">// <![CDATA[
  google_ad_client = "ca-pub-1685490665026631"; /* images */ google_ad_slot = "1433358698"; google_ad_width = 300; google_ad_height = 250;
// ]]&gt;</script></p>
<p><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">// <![CDATA[</p>
<p>// ]]&gt;</script></p>
<p>4 Click Make changes button to Db to give the user permission to access the database.</p>
<p>You can also refer the following Video </p>
<p><a href="http://www.youtube.com/watch?v=qAbX2chQHfQ">Grant Privilege To Mysql Database User </a></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/mysql-error-acesss-denied-for-the-user-to-the-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Partition targeted by hackers to hack Linux Server</title>
		<link>http://www.theperfectarts.com/2012/05/partition-targeted-by-hackers-to-hack-linux-server/</link>
		<comments>http://www.theperfectarts.com/2012/05/partition-targeted-by-hackers-to-hack-linux-server/#comments</comments>
		<pubDate>Thu, 10 May 2012 14:58:18 +0000</pubDate>
		<dc:creator>Gunjan</dc:creator>
				<category><![CDATA[Dedicated Server Issue]]></category>
		<category><![CDATA[Linux Administrator Interview Questions]]></category>
		<category><![CDATA[VPS]]></category>

		<guid isPermaLink="false">http://www.theperfectarts.com/?p=2278</guid>
		<description><![CDATA[Basically hackers uploading the hacking script under the server insecure partition, so that hacking script easily executed server side and user can&#8217;t understand where hacking script is actually.To secure the server make sure that partition not having execution permission.Once in every week monitor the following partition and remove the files which is seems to be [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"></p>
<p>  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27772211-1']);
  _gaq.push(['_trackPageview']);</p>
<p>  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();</p>
<p></script><br />
Basically hackers uploading the hacking script under the server insecure partition, so that hacking script easily executed server side and user can&#8217;t understand where hacking script is actually.To secure the server make sure that partition not having execution permission.Once in every week monitor the following partition and remove the files which is seems to be hacking file.<br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big banner */
google_ad_slot = "7006637961";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<strong>/tmp<br />
/dev/shm<br />
/usr/local/apache/proxy<br />
/usr/local/flash<!-- Place this tag where you want the +1 button to render --><br />
<g:plusone annotation="inline"></g:plusone></p>
<p><!-- Place this render call where appropriate --><br />
<script type="text/javascript">
  (function() {
    var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
    po.src = 'https://apis.google.com/js/plusone.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
  })();
</script></strong><br />
<script type="text/javascript"><!--
google_ad_client = "ca-pub-1685490665026631";
/* Big banner */
google_ad_slot = "7006637961";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script><br />
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>&copy;2012 <a href="http://www.theperfectarts.com">Linux Servers cPanel webhosting blog</a>. All Rights Reserved.</p>.]]></content:encoded>
			<wfw:commentRss>http://www.theperfectarts.com/2012/05/partition-targeted-by-hackers-to-hack-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

