<?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>Mohsin Sumar</title>
	<atom:link href="http://www.mohsinsumar.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mohsinsumar.com</link>
	<description>Zend Certified Engineer, PHP Professional, Designer &#38; Web Developer</description>
	<lastBuildDate>Tue, 08 Dec 2009 09:43:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Securing PHP application from malicious scripts</title>
		<link>http://www.mohsinsumar.com/php/securing-php-application-from-malicious-scripts/</link>
		<comments>http://www.mohsinsumar.com/php/securing-php-application-from-malicious-scripts/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 22:35:48 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[.htaccess disable directory listing]]></category>
		<category><![CDATA[how is chmod 777 insecure]]></category>
		<category><![CDATA[options all -indexes]]></category>
		<category><![CDATA[php application security]]></category>
		<category><![CDATA[php upload security]]></category>
		<category><![CDATA[prevent malicious code execution]]></category>
		<category><![CDATA[Secure File Uploads]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=91</guid>
		<description><![CDATA[If you've stumbled across this post, then you've recently become a victim of the most famous way of uploading a malicious script to a website - PHP file uploads. Read through this article to understand the problem and an easy solution to add an extra layer of security to your web application. ]]></description>
			<content:encoded><![CDATA[<p>If you've stumbled across this post, then you've recently become a victim of the most famous way of uploading a malicious script to a website - PHP file uploads.</p>
<p>Many websites and web applications that are developed using PHP &amp; MySQL allow users to upload files, photos and documents to the server. Normally, the upload script receives the files and moves (or writes) it to a directory (folder) with write permissions. If you are on Linux, then this would mean that your folder CHMOD value is 0777.</p>
<p><span style="text-decoration: underline;"><strong>The Problem</strong></span><br />
The changing of CHMOD value to 0777 practically allows anyone in the WORLD to write to your folder and is therefore not recommended. However, many a times we are left with no option but to do so - depending on the servers' environment.</p>
<p><span style="text-decoration: underline;"><strong>How can this be a problem?</strong></span><br />
This allows attackers to upload upload a malicious PHP script to your directory, which they will then execute by accessing it. This script could either be a mass-mailing script or a malicious script to gain access to your account (or web server).</p>
<p><span style="text-decoration: underline;"><strong>The Solution</strong></span><br />
It is said that prevention is better than cure - and therefore, it is important to prevent these scripts from being executed by the server. This can very simply be done by adding a few lines of code to your .htaccess file. If your directory is supposed to hold photo files only, then the following code is recommended to prevent scripts from being executed.</p>
<p>It is also important to disable directory listing on these folders.</p>
<pre><span style="color: #800000;"># Disable Directory Listing
Options All -Indexes</span>

<span style="color: #800000;"># Allow access to these file extensions only
</span><span style="color: #800000;">&lt;FilesMatch "\.(htaccess|htpasswd|ini|php|cgi|pl|phps|sh)$"&gt;
 Order Allow,Deny
 Deny from all
&lt;/FilesMatch&gt;</span><span style="color: #800000;">
</span></pre>
<p>The above will add an extra layer of security to your web application.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/php/securing-php-application-from-malicious-scripts/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How do I extract a tar file?</title>
		<link>http://www.mohsinsumar.com/ssh/how-do-i-extract-a-tar-file/</link>
		<comments>http://www.mohsinsumar.com/ssh/how-do-i-extract-a-tar-file/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 21:31:47 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[extract tar]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=79</guid>
		<description><![CDATA[Using the following command in SSH, you will be able to extract files from your tar file.
tar -xf file.tar 
]]></description>
			<content:encoded><![CDATA[<p>Using the following command in SSH, you will be able to extract files from your tar file.</p>
<pre><span style="color: #800000;">tar -xf file.tar</span><tt> </tt></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/ssh/how-do-i-extract-a-tar-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to tar a file using SSH?</title>
		<link>http://www.mohsinsumar.com/ssh/how-to-tar-a-file-using-ssh/</link>
		<comments>http://www.mohsinsumar.com/ssh/how-to-tar-a-file-using-ssh/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 17:23:13 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[compress tar]]></category>
		<category><![CDATA[create compressed tar]]></category>
		<category><![CDATA[tar file]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=82</guid>
		<description><![CDATA[Use the following command if you want to create a tar and compress a file (or folder).
tar -czf /path/to/save/file.tar folder_or_file_name
The options used in the above command are outlined below for your understanding.
-c = create
-z = compress a file
-f = use the file mentioned instead of tape drive
]]></description>
			<content:encoded><![CDATA[<p>Use the following command if you want to create a tar and compress a file (or folder).</p>
<pre><span style="color: #800000;">tar -czf /path/to/save/file.tar folder_or_file_name</span></pre>
<p>The options used in the above command are outlined below for your understanding.</p>
<p>-c = create<br />
-z = compress a file<br />
-f = use the file mentioned instead of tape drive</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/ssh/how-to-tar-a-file-using-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A man should look for what is, and not for what he thinks should be.</title>
		<link>http://www.mohsinsumar.com/words-of-wisdom/a-man-should-look-for-what-is-and-not-for-what-he-thinks-should-be/</link>
		<comments>http://www.mohsinsumar.com/words-of-wisdom/a-man-should-look-for-what-is-and-not-for-what-he-thinks-should-be/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 21:32:44 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[Words of Wisdom]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=76</guid>
		<description><![CDATA["A man should look for what is, and not for what he thinks should be."
- Albert Einstein
]]></description>
			<content:encoded><![CDATA[<p>"A man should look for what is, and not for what he thinks should be."<br />
- Albert Einstein</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/words-of-wisdom/a-man-should-look-for-what-is-and-not-for-what-he-thinks-should-be/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH ls pagewise or limit long output</title>
		<link>http://www.mohsinsumar.com/ssh/ssh-ls-pagewise-output/</link>
		<comments>http://www.mohsinsumar.com/ssh/ssh-ls-pagewise-output/#comments</comments>
		<pubDate>Sat, 14 Nov 2009 12:26:31 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[limit output]]></category>
		<category><![CDATA[ls]]></category>
		<category><![CDATA[ls -l]]></category>
		<category><![CDATA[ls | more]]></category>
		<category><![CDATA[pagewise output]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=71</guid>
		<description><![CDATA[If your SSH ls command output is really long, and cannot be viewed on screen - you can use the following command to part of it with a more command to continue down the list.
ls [options here] &#124; more
Example:-
ls -l &#124; more
]]></description>
			<content:encoded><![CDATA[<p>If your SSH ls command output is really long, and cannot be viewed on screen - you can use the following command to part of it with a more command to continue down the list.</p>
<pre><span style="color: #800000;">ls [options here] | more</span></pre>
<p>Example:-</p>
<pre><span style="color: #800000;">ls -l | more</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/ssh/ssh-ls-pagewise-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My 22nd Birthday</title>
		<link>http://www.mohsinsumar.com/general/my-22nd-birthday/</link>
		<comments>http://www.mohsinsumar.com/general/my-22nd-birthday/#comments</comments>
		<pubDate>Sun, 08 Nov 2009 07:00:18 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=74</guid>
		<description><![CDATA[I was born around this time around 22 years ago.
Thank you to everybody for your thoughtful birthday wishes via phone call, text message, email and facebook!
]]></description>
			<content:encoded><![CDATA[<p>I was born around this time around 22 years ago.</p>
<p>Thank you to everybody for your thoughtful birthday wishes via phone call, text message, email and facebook!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/general/my-22nd-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Success is not how far you get but&#8230;</title>
		<link>http://www.mohsinsumar.com/words-of-wisdom/success-is-not-how-far-you-get/</link>
		<comments>http://www.mohsinsumar.com/words-of-wisdom/success-is-not-how-far-you-get/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 23:31:12 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[Words of Wisdom]]></category>
		<category><![CDATA[proverb]]></category>
		<category><![CDATA[success]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=69</guid>
		<description><![CDATA[Success is not how far you get, but the distance you travel from where you started.]]></description>
			<content:encoded><![CDATA[<p><em>"Success is not how far you get, but the distance you travel from where you started."</em></p>
<p><em> </em>Today, I came across this well said proverb while watching one of my favorite TV shows, Numb3rs - the 6th season. I often come across such words of wisdom from many different places which I'll be posting it up on my blog. Stay tuned.</p>
<p><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/words-of-wisdom/success-is-not-how-far-you-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Hierarchy of Digital Distractions</title>
		<link>http://www.mohsinsumar.com/general/the-hierarchy-of-digital-distractions/</link>
		<comments>http://www.mohsinsumar.com/general/the-hierarchy-of-digital-distractions/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 00:14:14 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=60</guid>
		<description><![CDATA[I stumbled across this infographic on Information in Beautiful. It illustrates the Hierarchy of Digital Distractions. I'm quite amazed with this infographic and find it very true. How true do you find this? Click on the image to see this infographic in its original size.
Tip: start from the bottom.  
 
]]></description>
			<content:encoded><![CDATA[<div id="attachment_65" class="wp-caption alignright" style="width: 160px"><a href="http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digital-distractions/"><img class="size-thumbnail wp-image-65" title="The Hierarchy of Digital Distractions" src="http://www.mohsinsumar.com/wp-content/uploads/2009/10/hierarchy_distractions_960-150x150.jpg" alt="The Hierarchy of Digital Distractions" width="150" height="150" /></a><p class="wp-caption-text">The Hierarchy of Digital Distractions</p></div>
<p>I stumbled across this <a href="http://www.informationisbeautiful.net/visualizations/the-hierarchy-of-digital-distractions/" target="_blank">infographic</a> on <a href="http://www.informationisbeautiful.net" target="_blank">Information in Beautiful</a>. It illustrates the Hierarchy of Digital Distractions. I'm quite amazed with this infographic and find it very true. How true do you find this?<strong> </strong>Click on the image to see this infographic in its original size.</p>
<p><strong>Tip: start from the bottom. <img src='http://www.mohsinsumar.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p><strong> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/general/the-hierarchy-of-digital-distractions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Help! I&#8217;m using wordpress and my site disappeared from all search engines.</title>
		<link>http://www.mohsinsumar.com/search-engine-optimization/help-im-using-wordpress-and-my-site-disappeared-from-all-search-engines/</link>
		<comments>http://www.mohsinsumar.com/search-engine-optimization/help-im-using-wordpress-and-my-site-disappeared-from-all-search-engines/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 20:07:30 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[Search Engine Optimization]]></category>
		<category><![CDATA[robots meta]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=58</guid>
		<description><![CDATA[It's simple and easy to fix. Simply log into your wordpress administration area and update the setting on the privacy page (Settings > Privacy). Read more for detailed instructions on how to fix your problem. ]]></description>
			<content:encoded><![CDATA[<p>After a really long time of absence in maintaining my own personal website, I decided to install wordpress blog to get my site back online quickly. Without going over the settings thoroughly, I was happy that my site was back online quickly. I started blogging and hoping my blog posts would have a good impact on search engine results. <strong>Unfortunately, my site disappeared from search engines completely!</strong></p>
<p>If you recently installed wordpress and are wondering why your site is not on any search engines, the culprit is the privacy options in wordpress. By default - it is set to reject all search engines besides normal visitors by setting the robots meta tag <strong>to noindex, nofollow</strong>.</p>
<p>The good thing is that it's really easy to fix this. Follow the instructions below and you'll be on your way to wait for Google &amp; other search engine bots to crawl your site again.</p>
<ol>
<li>Log into Wordpress Administration Area (wp-admin)</li>
<li>Go to Settings &gt; Privacy</li>
<li>Select: <strong>I would like my blog to be visible to everyone, including search engines (like Google, Sphere, Technorati) and archivers</strong></li>
<li>Save settings</li>
</ol>
<p>I hope this helps.</p>
<p>Happy Blogging!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/search-engine-optimization/help-im-using-wordpress-and-my-site-disappeared-from-all-search-engines/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH Commands to find files on Linux Server</title>
		<link>http://www.mohsinsumar.com/ssh/ssh-commands-to-find-files-on-linux-server/</link>
		<comments>http://www.mohsinsumar.com/ssh/ssh-commands-to-find-files-on-linux-server/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 04:49:26 +0000</pubDate>
		<dc:creator>Mohsin Sumar</dc:creator>
				<category><![CDATA[SSH]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[email search results using ssh]]></category>
		<category><![CDATA[file search]]></category>
		<category><![CDATA[PuTTY]]></category>
		<category><![CDATA[save ssh search results to file]]></category>
		<category><![CDATA[search using ssh]]></category>

		<guid isPermaLink="false">http://www.mohsinsumar.com/?p=52</guid>
		<description><![CDATA[A couple of useful SSH commands to find files on your linux server.]]></description>
			<content:encoded><![CDATA[<p>If you have a dedicated server or a VPS - or any Linux machine with SSH access, the following commands may be useful to you if you are looking to find some files quickly. <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty" target="_blank">PuTTY</a> is a good telnet/SSH client if you don't already have one. Let's get started.</p>
<p>#1: If you are looking for a particular file in /home directory</p>
<pre><span style="color: #800000;">find /home -name filename</span></pre>
<p>#2: If you are looking for files whose name is starting with "filename" in public_html directories only, you can use the following command:-</p>
<pre><span style="color: #800000;">find /home/*/public_html -name filename* </span></pre>
<p>#3: Instead of viewing your search results in command line, you can write it to file by using this:</p>
<pre><span style="color: #800000;">find /home/*/public_html -name filename* &gt; /home/filename_search.txt</span></pre>
<p>#4: Alternatively, you can send it via e-mail directly from server using the command below. Don't forget to replace "Subject Here" with your email subject, and "email.address@domain" with your email ID.</p>
<pre><span style="color: #800000;">find /home/*/public_html -name filename* |mail -s "Subject Here" e-mail.address@domain
</span></pre>
<p>I hope this was useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mohsinsumar.com/ssh/ssh-commands-to-find-files-on-linux-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
