<?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>Dev4Press&#187; scripts Tag Archives, page 1 of 1 | Dev4Press</title>
	<atom:link href="http://www.dev4press.com/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dev4press.com</link>
	<description>Premium Plugins and Themes for WordPress</description>
	<lastBuildDate>Thu, 23 May 2013 09:33:41 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>WordPress Security, Part 2: Files Protection</title>
		<link>http://www.dev4press.com/2010/tutorials/wordpress/practical/wordpress-security-part-2-files-protection/</link>
		<comments>http://www.dev4press.com/2010/tutorials/wordpress/practical/wordpress-security-part-2-files-protection/#comments</comments>
		<pubDate>Thu, 16 Dec 2010 13:00:21 +0000</pubDate>
		<dc:creator>MillaN</dc:creator>
				<category><![CDATA[Practical]]></category>
		<category><![CDATA[all files and folders]]></category>
		<category><![CDATA[CHMOD]]></category>
		<category><![CDATA[different ways]]></category>
		<category><![CDATA[file permissions]]></category>
		<category><![CDATA[files and folders]]></category>
		<category><![CDATA[GD Press Tools]]></category>
		<category><![CDATA[good job]]></category>
		<category><![CDATA[hackers]]></category>
		<category><![CDATA[hosting companies]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[owner group]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[server settings]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.dev4press.com/?p=4214</guid>
		<description><![CDATA[First step to ensure that your WordPress website is secure, is to set proper file permissions rights. Wrong file permissions can easily lead to hackers gaining access to your website. So, after you first install WordPress, no matter what method you used, you must check those rights and set them properly.]]></description>
				<content:encoded><![CDATA[<p>First step to ensure that your WordPress website is secure, is to set proper file permissions rights. Wrong file permissions can easily lead to hackers gaining access to your website. So, after you first install WordPress, no matter what method you used, you must check those rights and set them properly.</p>
<p>When you first install WordPress, you can do it manually or you can use some sort of install script that is usually offered by the shared hosting companies. In my experience, those scripts usually do a good job in setting at least initial file permissions to all files and folders. But, on the other hand that may not always be the case, and you can end up in problems.</p>
<p>Main issue is to allow WordPress to access files and folders it needs to be able to work properly, and in the same time not to set permissions too loose so that it can be exploited. To change the file permissions, Linux uses CHMOD command. Permissions for files and folders are represented by three values controlling access for file owner, for owner group and for everyone else (world). And each of these controls 3 rights: read, write and execute. There are different ways to display file permissions, and most common is to use 3 numbers: first for owner, second for group and third for world. File system and file permissions can be very complex, and more info on how all that is working can be found on URL&#8217;s at the bottom of this articles.</p>
<blockquote><p>Since we are talking about file system on your server, referring to users and groups has nothing to do with WordPress. User or owner is your account on the server not in WordPress.</p></blockquote>
<h3>Recommended permissions</h3>
<p>Before you check and set CHMOD for files and folders, it&#8217;s recommended that owner for all files and folder is your user account on the server. If, when you copy new files or add new files, this is not the case, and if server is setting someone else as an owner, then, there is something wrong with your server settings. In my experience, this usually happens if you are installing and setting server on your own (VPS hosting) and you missed configuring file system ownership, that depending on OS you use, can be set to Apache process or something else. <strong>Make sure that all files and folders in your WP installation are owned by your user.</strong> All other recommendations are based on this one, so make sure it&#8217;s set as it should be.</p>
<div id="attachment_4288" class="wp-caption alignright" style="width: 280px"><a href="http://cdn.dev4press.com/wp-content/uploads/2010/12/ftp_rights.png" rel="lightbox[4214]" title="FTP View of Permissions"><img class="size-medium wp-image-4288" title="FTP View of Permissions" src="http://cdn.dev4press.com/wp-content/uploads/2010/12/ftp_rights-300x136.png" alt="FTP View of Permissions" width="270" height="122" /></a><p class="wp-caption-text">FTP View of Permissions</p></div>
<p>For all folder in the WordPress installation, recommended permission is <strong>755</strong>. This means that owner (first number, 7) can read, write folder and execute content in it. Group and world can&#8217;t write. This makes folders safe from anyone beside your main user adding new files, or deleting existing files. Files should be set to <strong>644</strong>, the same as 755, but with no execute set. For folders you need owner, group and world to be able to at least read from the folders, or your website will not be publicly accessible, so that&#8217;s why 5 is set for group and world.</p>
<p>If you are using FTP or command line tools, you will usually see permissions displayed like on the image on the right with string with 10 characters. First is telling if it&#8217;s file or folder, and 9 are flags for all 3 groups, 3 rights each. Here you can also see owner and group. While they are named, here are codes representing the names on your server.</p>
<h3>Specific files permissions</h3>
<p>For some files and folders you can use different permissions to make sure that they are extra secure. So, for <strong>wp-config.php</strong>, recommended permissions is <strong>640</strong> or even <strong>600</strong>. Same goes for <strong>.htaccess</strong> files. In shared environments, you can also have <strong>PHP</strong> files present (php.ini and/or php.cgi). For these files you can set even more restrictive permissions: <strong>100</strong>, and only owner can execute these files, nothing else.</p>
<div id="attachment_4284" class="wp-caption alignright" style="width: 250px"><a title="File Permissions in GD Press Tools Pro" rel="lightbox" href="http://cdn.dev4press.com/wp-content/uploads/2010/12/gdpt_sec_files.png"><img class="size-medium wp-image-4284" title="File Permissions in GD Press Tools Pro" src="http://cdn.dev4press.com/wp-content/uploads/2010/12/gdpt_sec_files-300x150.png" alt="File Permissions in GD Press Tools Pro" width="240" height="120" /></a><p class="wp-caption-text">File Permissions in GD Press Tools Pro</p></div>
<h3>GD Press Tools Pro</h3>
<p>To do all this, you can use command line on your server, FTP access or file manager you have in the control panel for your hosting account. But, you can do it from WordPress also. <strong><a href="http://www.dev4press.com/gd-press-tools/">GD Press Tools Pro</a></strong> on the Security panel shows most important files and folders in your WP installation, their files permissions and options to change those that are not restrictive as recommended values are.</p>
<p>Also, on the Security panel, tab General you can set default CHMOD values WordPress can use to set on newly created files and folders (uploads mostly).</p>
<h3>Conclusion</h3>
<p>Permissions described in this article will be enough to make all critical areas of your website secure. But, you can take this further and experiment with more restrictive rules for some folders, or some more files.</p>
<h3>Resources</h3>
<ul>
<li>Changing File Permissions: <a href="http://codex.wordpress.org/Changing_File_Permissions">http://codex.wordpress.org/Changing_File_Permissions</a></li>
<li>CHMOD on Wikipedia: <a href="http://en.wikipedia.org/wiki/Chmod" target="_blank">http://en.wikipedia.org/wiki/Chmod</a></li>
</ul>
<script src="http://feeds.feedburner.com/~s/adsense@gdragon.info?i=http://www.dev4press.com/2010/tutorials/wordpress/practical/wordpress-security-part-2-files-protection/" type="text/javascript" charset="utf-8"></script>]]></content:encoded>
			<wfw:commentRss>http://www.dev4press.com/2010/tutorials/wordpress/practical/wordpress-security-part-2-files-protection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk: enhanced
Content Delivery Network via cdn.dev4press.com

 Served from: www.dev4press.com @ 2013-05-25 07:24:39 by W3 Total Cache -->