<?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>GrenadePod &#187; system administration</title>
	<atom:link href="http://www.grenadepod.com/tag/system-administration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.grenadepod.com</link>
	<description>Dispersing the Seeds</description>
	<lastBuildDate>Mon, 22 Feb 2010 20:30:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Sorting out YUM repositories on CentOS 5.4</title>
		<link>http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/</link>
		<comments>http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 19:01:45 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=647</guid>
		<description><![CDATA[&#8230; or any other CentOS 5.X flavour for that matter. By default, freshly installed CentOS 5.X has the following Yum repositories enabled: addons CentOS-5 - Addons base CentOS-5 - Base extras CentOS-5 - Extras updates CentOS-5 - Updates These are all defined in /etc/yum.repos.d/CentOS-Base.repo configuration file. Repositories enabled by default provide you with the core [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />&#8230; or any other CentOS 5.X flavour for that matter.</p>
<p>By default, freshly installed CentOS 5.X has the following Yum repositories enabled:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">addons                                             CentOS-5 - Addons
base                                               CentOS-5 - Base
extras                                             CentOS-5 - Extras
updates                                            CentOS-5 - Updates</pre></div></div>

<p>These are all defined in <em>/etc/yum.repos.d/CentOS-Base.repo</em> configuration file. Repositories enabled by default provide you with the core CentOS packages and updates for them. So you must have them enabled if you want your updates to work correctly. It is also important that these repositories take precedence over other repositories that you are going to use.</p>
<p>I will show later how to use Yum priorities package, just note that these are going to be priority one repositories</p>
<h3>Enable standard CentOS repositories</h3>
<p>There are two useful repositories defined in the configuration, but not enabled:</p>
<ul>
<li><strong>CentOS Plus</strong>. Packages in this repository contains upgraded versions of the software. If you enable this repository, after applying updates/upgrades your system will no longer be of the original version you have installed. Fear not though, all packages are tested by CentOS team and will no cause any issues. So unless you have really good reason to keep you installation at the same version level I&#8217;d recommend enabling this repository.</li>
<li><strong>Contrib</strong>. Packages supplied and maintained by CentOS users. These packages are not inspected by CentOS team, but they are not attempt to replace/modify core CentOS package set, so normally this repository should not cause any issues. Beware that some packages are not following mainstream CentOS very closely. I normally don&#8217;t have this enabled.</li>
</ul>
<p>These two repositories are going to get priority two setting. If you wish to enable them, edit default <em>/etc/yum.repos.d/CentOS-Base.repo</em> Yum repository configuration file and remove (or rather comment out) &#8220;<em>enabled=0</em>&#8221; line.</p>
<h3>Install and enable EPEL repository</h3>
<p>I must mention, that in this article I&#8217;m mostly talking about CentOS installation that is used for server environment. Therefore I&#8217;m not really interested in repositories that provide packages such as DVD or other multimedia decoders and players.</p>
<p>One of the most useful repositories for your server environment is <a href="http://fedoraproject.org/wiki/EPEL" target="_blank">EPEL repository</a> &#8211; Extra Packages for Enterprise Linux. This repository is maintained by Fedora project, and every effort is made to keep this repository as least  intrusive as possible, so in theory enabling and using this repository should not break or otherwise cause issues to your CentOS installation.</p>
<p>First of all, you need to install EPEL repository configuration files:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">[root@centos54 ~]# rpm -ihv http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
warning: /var/tmp/rpm-xfer.RT5AzP: Header V3 DSA signature: NOKEY, key ID 217521f6
Preparing...                ########################################### [100%]
   1:epel-release           ########################################### [100%]
[root@centos54 ~]#</pre></div></div>

<p>This provides you with two configuration files: base and testing. Don&#8217;t worry about testing one and leave it disabled.</p>
<p>Main configuration comes with three sections:</p>
<ul>
<li><strong>Base packages</strong>. This is enabled by default.</li>
<li><strong>Debug packages</strong>. Disabled, and no need to enable unless you want to use debug packages.</li>
<li><strong>Source packages</strong>. Disabled. Enable only if you want to be able to install source RPMs from EPEL. Useful if you want to rebuild them to your specific needs. I&#8217;d recommend to leave it disabled and enable on yum command line only when you really need to install source RPMs.</li>
</ul>
<p>These should be getting priority 3 setting.</p>
<h3>Set priorities for Yum repositories</h3>
<p>So if you enabled repositories from the previous section and installed EPEL repository configuration, here&#8217;s what you should see in you repositories list:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">addons                             CentOS-5 - Addons
base                               CentOS-5 - Base
centosplus                         CentOS-5 - Plus
epel                               Extra Packages for Enterprise Linux 5 - i386
extras                             CentOS-5 - Extras
updates                            CentOS-5 - Updates</pre></div></div>

<p>Now I need to set priorities for each repository. Install Yum priorities package:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;"># yum install yum-priorities</pre></div></div>

<p>Make sure new plugin is enabled:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">[root@centos54 ~]# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
[root@centos54 ~]#</pre></div></div>

<p>Now you can set priorities for each repository. It&#8217;s done by adding &#8220;priority=X&#8221; for each repository section in repository configuration files. Here&#8217;s what I ended up with:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">[base]
...
priority=1
&nbsp;
[updates]
...
priority=1
&nbsp;
[addons]
...
priority=1
&nbsp;
[extras]
...
priority=1
&nbsp;
[centosplus]
...
priority=2
&nbsp;
[contrib]
...
priority=2
&nbsp;
[epel]
...
priority=3</pre></div></div>

<p>Now you should be good to do upgrades and install packages as you see fit for your system.</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building and running Google Chrome OS on VirtualBox</title>
		<link>http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/</link>
		<comments>http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 18:49:22 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=548</guid>
		<description><![CDATA[This is (sort of) hot topic on the internets at the moment. Google released their Linux based Chrome OS to the public. It&#8217;s still in beta and under development, but you can try it now. There are lots of manuals such as this one, that instruct how to run already built image using Sun VirtualBox. [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/' rel='bookmark' title='Permanent Link: Sorting out YUM repositories on CentOS 5.4'>Sorting out YUM repositories on CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/11/05/the-most-unusual-photocameras/' rel='bookmark' title='Permanent Link: The most unusual photocameras'>The most unusual photocameras</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />This is (sort of) hot topic on the internets at the moment. Google released their Linux based <a href="http://www.chromium.org/chromium-os" target="_blank">Chrome OS</a> to the public. It&#8217;s still in beta and under development, but you can try it now. There are lots of manuals such as <a href="http://chromeos-blog.com/tutorial-chrome-os-virtualbox/" target="_blank">this one</a>, that instruct how to run already built image using Sun VirtualBox. But this is not fun, because:</p>
<ul>
<li>Insecure. Who knows who&#8217;s built the image and if they aren&#8217;t sending your Google login data to themselves when you login</li>
<li>You&#8217;re stuck with that particular release. As I said, it&#8217;s in development, so new features and bug fixes get introduced on a daily basis</li>
</ul>
<p>So I&#8217;ll show you how to (relatively) quickly build your very own Google Chrome OS. This instruction tells how to build Chromium OS with pre-built Chromium web browser. You will also need Sun <a href="http://www.virtualbox.org/" target="_blank">VirtualBox</a>.</p>
<p>In a nutshell:</p>
<ul>
<li>Install Ubuntu as a VirtualBox VM</li>
<li>Download ChromeOS sources</li>
<li>Build ChromeOS</li>
<li>Create VMWare image</li>
<li>Boot it in VirtualBox</li>
<li>Enjoy</li>
</ul>
<p>For the latest build release numbers check <a href="http://sites.google.com/a/chromium.org/dev/chromium-os/building-chromium-os/build-instructions" target="_blank">Chromium OS build page</a>.</p>
<h3>Preparation</h3>
<p><strong><em>Install Ubuntu</em></strong></p>
<p>Do the standard installation, as you would normally do. I selected all defaults, and allocated 20GB single partition for the installation and assigned 512MB RAM.</p>
<p><strong><em>Get OS source</em></strong></p>
<p>Download/unpack <a href="http://build.chromium.org/buildbot/archives/chromiumos-0.4.22.8.tar.gz" target="_blank">http://build.chromium.org/buildbot/archives/chromiumos-0.4.22.8.tar.gz</a> to <em>/home/user/chromiumos/</em></p>
<p><strong>NOTE!</strong> It seems that Google have removed OS tarballs and you now have to use <a href="http://sites.google.com/a/chromium.org/dev/chromium-os/building-chromium-os/getting-the-chromium-os-source-code" target="_blank">these instructions</a> to get the source code.</p>
<p><strong><em>Install some additional packages required to build ChromiumOS</em></strong></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ sudo apt-get install subversion pkg-config python perl g++ g++-multilib \
bison flex gperf libnss3-dev libgtk2.0-dev libnspr4-0d libasound2-dev \
libnspr4-dev msttcorefonts libgconf2-dev libcairo2-dev libdbus-1-dev
$ sudo apt-get install wdiff lighttpd php5-cgi sun-java6-fonts</pre></div></div>

<h3>OS build</h3>
<p><strong><em>Building local repository</em></strong></p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">cd ~/chromiumos/src/scripts
./make_local_repo.sh</pre></div></div>

<p>Watch the output carefully and make sure it hasn&#8217;t failed with some errors!</p>
<p>Google says if the script fails, remove repo directory and call the script again. It hasn&#8217;t failed for me, so if you&#8217;ve done everything as per above you should be fine. I don&#8217;t really understand why calling the same script might make any difference…</p>
<p>This step is quite lengthy, so you might want to make yourself some coffee or tea. Or just take a short walk if the weather is good.</p>
<p><strong><em>Create build environment</em></strong></p>
<p>Another totally automated step. Just run</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">./make_chroot.sh</pre></div></div>

<p>Which creates chroot&#8217;ed build environment for you. This uses all packages you downloaded in the previous step. There are adoption how to pull required packages from the remote repositories (Google and official Ubuntu), but I advise to take an easy way and download all packages first and build locally.</p>
<p><strong><em>Get Chromium binary</em></strong></p>
<p>make the following directory:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">mkdir -p ~/chromiumos/src/build/x86/local_assets</pre></div></div>

<p>And download chromium package from Google:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">wget -O ~/chromiumos/src/build/x86/local_assets/chrome-chromeos.zip \
http://build.chromium.org/buildbot/archives/chromium-chromiumos-r32516.zip</pre></div></div>

<p><strong><em>Building OS</em></strong></p>
<p>First you need to enter you chroot&#8217;ed build environment. Use the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">./enter_chroot.sh</pre></div></div>

<p>I also recommend generating password for shared user, so that you can sudo from the terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">./set_shared_user_password.sh</pre></div></div>

<p>And finally build all packages:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">./build_all.sh</pre></div></div>

<p>At this point, go and make some more tea or coffee. Which I wouldn&#8217;t recommend, though. Simply because you will have trouble getting asleep. Because sleeping is the most sane thing you might want to do at this moment. Building OS packages takes ages!…</p>
<p>But seriously, it&#8217;s not that bad, it took about an hour and a half on my Ubuntu VM to build it.</p>
<p><strong>Make VM image and boot it in VirtualBox</strong></p>
<p><strong><em>Build bootable image</em></strong></p>
<p>Once all packages have been built, you need to create OS image to boot from. Image build process creates two artefacts:<br />
- Master boot record (mbr.image)<br />
- Root FileSystem (rootfs.image)</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;" lang="shell">./build_image.sh</pre>
<p>Once the image files have been creates, the script will tell you where to find them. It is going to be in ~/chromiumos/src/build/images//</p>
<p>Here&#8217;s what you will have once the image build is done:</p>
<pre style="font: normal normal normal 12px/18px Consolas, Monaco, 'Courier New', Courier, monospace;" lang="shell">pulegium@ubuntu:~/chromiumos/src/build/images/999.999.33509.212332-a1$ ls -lh
total 729M
-rw-r--r--  1 pulegium 5000  512 2009-12-01 21:34 mbr.image
-rw-r--r--  1 root     root  40K 2009-12-01 21:31 package_list_installed.txt
-rw-r--r--  1 root     root  40K 2009-12-01 21:34 package_list_pruned.txt
drwxr-xr-x 22 root     root 4.0K 2009-12-01 21:29 rootfs
-rw-r--r--  1 pulegium 5000 950M 2009-12-01 21:23 rootfs.image</pre>
<div>Exit Chroot environment and run <em>image_to_vmware.sh</em> script which will create you a VM image. The script will tell you where the image is stored. Copy it to your VirtualBox machine. Mine was called <em>ide.vmdk<span style="font-style: normal;">.</span></em></div>
<div><strong><em>Attach image as VirtualBox VM disk</em></strong></div>
<div>Best to show where to click&#8230; So fire up VirtualBox and start creating new VM.</div>
<div>
<dl id="attachment_555" class="wp-caption aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><img class="size-medium wp-image-555" title="ChromeOS-1" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-1-300x261.png" alt="Creating New VM for Chrome OS" width="300" height="261" /></dt>
<dd class="wp-caption-dd">Creating New VM for Chrome OS</dd>
</dl>
</div>
<div>Then when prompted tell that you are going to use your own disk image.</div>
<div>
<div id="attachment_556" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-556" title="ChromeOS-2" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-2-300x261.png" alt="Tell VirtualBox to use existing image" width="300" height="261" /><p class="wp-caption-text">Tell VirtualBox to use existing image</p></div>
</div>
<div>Add new image&#8230;</div>
<div>
<div id="attachment_557" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-557" title="ChromeOS-3" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-3-300x267.png" alt="Add new image" width="300" height="267" /><p class="wp-caption-text">Add new image</p></div>
</div>
<div>And voila!</div>
<div>
<div id="attachment_558" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-558" title="ChromeOS-4" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-4-300x267.png" alt="Image added" width="300" height="267" /><p class="wp-caption-text">Image added</p></div>
</div>
<div><strong><em>Enjoy Chrome OS</em></strong></div>
<div>This is it, you&#8217;re ready to explore the new flashy OS&#8230; Enjoy!</div>
<div>
<dl id="attachment_559" class="wp-caption aligncenter" style="width: 310px;">
<dt class="wp-caption-dt"><img class="size-medium wp-image-559" title="ChromeOS-5" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-5-300x243.png" alt="Chrome OS login screen" width="300" height="243" /></dt>
<dd class="wp-caption-dd">Chrome OS login screen</dd>
</dl>
</div>
<div id="attachment_560" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-560 " title="ChromeOS-6" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-6-300x245.png" alt="Selection of preinstalled application. All web based and ready to go. Make sure you have connection to the internet. Chrome OS bit dull and TBH useless without internet..." width="300" height="245" /><p class="wp-caption-text">Selection of preinstalled application. All web based and ready to go. Make sure you have connection to the internet. Chrome OS bit dull and TBH useless without internet...</p></div>
<div>
<div id="attachment_561" class="wp-caption aligncenter" style="width: 310px"><img class="size-medium wp-image-561" title="ChromeOS-7" src="http://www.grenadepod.com/wp-content/uploads/2009/12/ChromeOS-7-300x245.png" alt="In general I think Chrome OS looks OK'ish, but this menu smells of M$ Windows..." width="300" height="245" /><p class="wp-caption-text">In general I think Chrome OS looks OK&#39;ish, but this menu smells of M$ Windows...</p></div>
</div>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/21/sorting-out-yum-repositories-on-centos-5-4/' rel='bookmark' title='Permanent Link: Sorting out YUM repositories on CentOS 5.4'>Sorting out YUM repositories on CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/11/05/the-most-unusual-photocameras/' rel='bookmark' title='Permanent Link: The most unusual photocameras'>The most unusual photocameras</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic Apache security</title>
		<link>http://www.grenadepod.com/2009/11/25/basic-apache-security/</link>
		<comments>http://www.grenadepod.com/2009/11/25/basic-apache-security/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 13:44:38 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[System administration]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=520</guid>
		<description><![CDATA[Below are just a few things to consider if you want to make your Apache installation more secure: Hide your identity Well, first of all you need to hide details about who you are, or rather what your webserver is. It is a good practice to always run on the latest security patch, but not [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/22/using-openid-for-authentication-in-django/' rel='bookmark' title='Permanent Link: Using OpenID for authentication in Django'>Using OpenID for authentication in Django</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Below are just a few things to consider if you want to make your Apache installation more secure:</p>
<h3>Hide your identity</h3>
<p>Well, first of all you need to hide details about who you are, or rather what your webserver is. It is a good practice to always run on the latest security patch, but not always feasible. So if you can&#8217;t upgrade in time, at least make attackers life harder by hiding details about your server:</p>
<pre>#
# ServerTokens
# This directive configures what you return as the Server HTTP response
# Header. The default is 'Full' which sends information about the OS-Type
# and compiled in modules.
# Set to one of:  Full | OS | Minor | Minimal | Major | Prod
# where Full conveys the most information, and Prod the least.
#
ServerTokens Prod

#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off</pre>
<h3>Allow only basic HTTP methods</h3>
<p>HTTP protocol defines GET, HEAD, POST, PUT, DELETE, OPTIONS, TRACE and CONNECT methods. Guess how many of those are actually used (intensively). Yup, only two. Most of the webservers would do just fine with only GET and POST methods. You might however find that you need more, so enable them as you see fit. In the example below I only allow two basic, commonly used methods:</p>
<pre>&lt;Location /&gt;
   &lt;LimitExcept GET POST&gt;
     Order allow,deny
     Deny from all
   &lt;/LimitExcept&gt;
 &lt;/Location&gt;</pre>
<h3>Disable old and insecure SSL</h3>
<p>Use only new protocols and only strong ciphers.</p>
<pre>SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM</pre>
<h3>Disable modules that you don&#8217;t need</h3>
<p>Again, this depends on your installation and what you&#8217;re actually using, but in most of the cases most of the modules that Apache loads by default are not needed. Search for LoadModule instruction and remove anything you don&#8217;t need. Good list to start:</p>
<ul>
<li>mod_imap</li>
<li>mod_include</li>
<li>mod_info</li>
<li>mod_userdir</li>
<li>mod_status</li>
<li>mod_cgi</li>
<li>mod_autoindex</li>
<li>mod_dav</li>
</ul>
<h3>Other settings</h3>
<p>Reduce timeout, which is 300 seconds by default. Meaning that the server waits for 5 minutes before it decides that the client is no longer there. Reduce it to something sensible, like 20-30 seconds to avoid potential DDoS attacks.</p>
<pre>Timeout 20</pre>
<p>Disable directory browsing for any directory that has no index file:</p>
<pre>Options -Indexes</pre>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/11/22/using-openid-for-authentication-in-django/' rel='bookmark' title='Permanent Link: Using OpenID for authentication in Django'>Using OpenID for authentication in Django</a></li>
<li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/25/basic-apache-security/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sysadmins of the past</title>
		<link>http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/</link>
		<comments>http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 07:35:58 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[photo]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=487</guid>
		<description><![CDATA[I wonder what are they up to these days?&#8230; Related posts:Military precision &#8211; Chinese way Funniest pictures of animals Goddesses of Karol Bak


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/10/military-precision-chinese-way/' rel='bookmark' title='Permanent Link: Military precision &#8211; Chinese way'>Military precision &#8211; Chinese way</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/funniest-pictures-of-animals/' rel='bookmark' title='Permanent Link: Funniest pictures of animals'>Funniest pictures of animals</a></li>
<li><a href='http://www.grenadepod.com/2009/11/05/goddesses-of-karol-bak/' rel='bookmark' title='Permanent Link: Goddesses of Karol Bak'>Goddesses of Karol Bak</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />I wonder what are they up to these days?&#8230;</p>

<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055528/' title='ST_055528'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055528-150x150.jpg" class="attachment-thumbnail" alt="ST_055528" title="ST_055528" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055530/' title='ST_055530'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055530-150x150.jpg" class="attachment-thumbnail" alt="ST_055530" title="ST_055530" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055532/' title='ST_055532'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055532-150x150.jpg" class="attachment-thumbnail" alt="ST_055532" title="ST_055532" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055534/' title='ST_055534'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055534-150x150.jpg" class="attachment-thumbnail" alt="ST_055534" title="ST_055534" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055536/' title='ST_055536'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055536-150x150.jpg" class="attachment-thumbnail" alt="ST_055536" title="ST_055536" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055538/' title='ST_055538'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055538-150x150.jpg" class="attachment-thumbnail" alt="ST_055538" title="ST_055538" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055540/' title='ST_055540'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055540-150x150.jpg" class="attachment-thumbnail" alt="ST_055540" title="ST_055540" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055542/' title='ST_055542'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055542-150x150.jpg" class="attachment-thumbnail" alt="ST_055542" title="ST_055542" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055544/' title='ST_055544'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055544-150x150.jpg" class="attachment-thumbnail" alt="ST_055544" title="ST_055544" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055546/' title='ST_055546'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055546-150x150.jpg" class="attachment-thumbnail" alt="ST_055546" title="ST_055546" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055548/' title='ST_055548'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055548-150x150.jpg" class="attachment-thumbnail" alt="ST_055548" title="ST_055548" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055550/' title='ST_055550'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055550-150x150.jpg" class="attachment-thumbnail" alt="ST_055550" title="ST_055550" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055552/' title='ST_055552'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055552-150x150.jpg" class="attachment-thumbnail" alt="ST_055552" title="ST_055552" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055554/' title='ST_055554'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055554-150x150.jpg" class="attachment-thumbnail" alt="ST_055554" title="ST_055554" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055556/' title='ST_055556'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055556-150x150.jpg" class="attachment-thumbnail" alt="ST_055556" title="ST_055556" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055558/' title='ST_055558'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055558-150x150.jpg" class="attachment-thumbnail" alt="ST_055558" title="ST_055558" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055600/' title='ST_055600'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055600-150x150.jpg" class="attachment-thumbnail" alt="ST_055600" title="ST_055600" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055602/' title='ST_055602'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055602-150x150.jpg" class="attachment-thumbnail" alt="ST_055602" title="ST_055602" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055604/' title='ST_055604'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055604-150x150.jpg" class="attachment-thumbnail" alt="ST_055604" title="ST_055604" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055606/' title='ST_055606'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055606-150x150.jpg" class="attachment-thumbnail" alt="ST_055606" title="ST_055606" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055608/' title='ST_055608'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055608-150x150.jpg" class="attachment-thumbnail" alt="ST_055608" title="ST_055608" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055610/' title='ST_055610'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055610-150x150.jpg" class="attachment-thumbnail" alt="ST_055610" title="ST_055610" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055612/' title='ST_055612'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055612-150x150.jpg" class="attachment-thumbnail" alt="ST_055612" title="ST_055612" /></a>
<a href='http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/st_055614/' title='ST_055614'><img width="150" height="150" src="http://www.grenadepod.com/wp-content/uploads/2009/11/ST_055614-150x150.jpg" class="attachment-thumbnail" alt="ST_055614" title="ST_055614" /></a>



<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/12/10/military-precision-chinese-way/' rel='bookmark' title='Permanent Link: Military precision &#8211; Chinese way'>Military precision &#8211; Chinese way</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/funniest-pictures-of-animals/' rel='bookmark' title='Permanent Link: Funniest pictures of animals'>Funniest pictures of animals</a></li>
<li><a href='http://www.grenadepod.com/2009/11/05/goddesses-of-karol-bak/' rel='bookmark' title='Permanent Link: Goddesses of Karol Bak'>Goddesses of Karol Bak</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/25/sysadmins-of-the-past/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Use SSH to upgrade WordPress plugins automatically</title>
		<link>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/</link>
		<comments>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 12:23:46 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=479</guid>
		<description><![CDATA[Here&#8217;s a quick summary on how to enable WordPress updates using SSH. For one or the other reason default FTP/SFTP method didn&#8217;t work for me, so I tried this, which seems to be working fine. Build and install SSH2 libraries Depending on your linux distribution you might need to use different method. On my Debian, [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />Here&#8217;s a quick summary on how to enable WordPress updates using SSH. For one or the other reason default FTP/SFTP method didn&#8217;t work for me, so I tried this, which seems to be working fine.</p>
<h3>Build and install SSH2 libraries</h3>
<p>Depending on your linux distribution you might need to use different method. On my Debian, I had to use the following to install:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  wget http://downloads.sourceforge.net/project/libssh2/libssh2-1.2.1.tar.gz?use_mirror=kent
#  tar zxf libssh2-1.2.1.tar.gz
#  cd libssh2-1.2.1
#  ./configure
#  make
#  make install</pre></div></div>

<p>What&#8217;s important here is that I had to build libssh2 from sources manually. However I hate doing this, it was apparently the only way. Aptitude was only offering me an older (0.12) version of the library, which failed to build PHP ssh2 extension.</p>
<h3>Build and install PHP SSH2 extension</h3>
<p>Now again, for some reason simple command failed to work for me&#8230; So I had to specify beta channel to install PHP SSH2 extension. Fear not though, just try this</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  pecl install ssh2</pre></div></div>

<p>And if it doesn&#8217;t work, then do this</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  pecl install channel://pecl.php.net/ssh2-0.11.0</pre></div></div>

<p>Simple, isn&#8217;t it?</p>
<h3>Generate SSH public and private keys</h3>
<p>You need to generate both public and private keys that are going to be used to connect to your server (even if it is the same server your connecting from!). Go to your home directory:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">$ cd .ssh
$ ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
fe:3b:5d:94:53:1e:d3:9f:87:45:73:ab:8d:9f:d7:cc user@server
$ cp id_rsa.pub authorized_keys</pre></div></div>

<p>Private key is used to decrypt the data, whereas public key is used by the remote host to encrypt the data. You also need to create authorized_keys file, so that server knows your key is trusted and allows you to login without using actual user account password.</p>
<p>There is one annoying bit though. Apache user needs to be able to read both private and public keys. Normally they are kept secure in user&#8217;s .ssh/ directory, which is readable by user only, and allowing all to see it, is not a particularly good idea. So I had to copy both files to /etc/wordpress/ and make them readable to www-data group:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">#  cd /etc
#  mkdir wordpress
#  cp /home/user/.ssh/id_rsa* wordpress/
#  chgrp www-data wordpress/*
#  chmod 640 wordpress/*</pre></div></div>

<h3>Configure WordPress to use public keys automatically</h3>
<p>Add the following lines to your wp-config.php file, so you&#8217;re not asked any passwords or server names during the upgrade:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PUBKEY'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/etc/wordpress/id_rsa.pub'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PRIKEY'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'/etc/wordpress/id_rsa'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_USER'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'user'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_PASS'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'FTP_HOST'</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'localhost:22'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>



<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/21/securing-wordpress/' rel='bookmark' title='Permanent Link: Securing WordPress'>Securing WordPress</a></li>
<li><a href='http://www.grenadepod.com/2009/12/26/building-python-2-6-4-rpm-for-centos-5-4/' rel='bookmark' title='Permanent Link: Building python 2.6.4 RPM for CentOS 5.4'>Building python 2.6.4 RPM for CentOS 5.4</a></li>
<li><a href='http://www.grenadepod.com/2009/12/03/building-and-running-google-chrome-os-on-virtualbox/' rel='bookmark' title='Permanent Link: Building and running Google Chrome OS on VirtualBox'>Building and running Google Chrome OS on VirtualBox</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Securing WordPress</title>
		<link>http://www.grenadepod.com/2009/11/21/securing-wordpress/</link>
		<comments>http://www.grenadepod.com/2009/11/21/securing-wordpress/#comments</comments>
		<pubDate>Sat, 21 Nov 2009 10:15:08 +0000</pubDate>
		<dc:creator>pulegium</dc:creator>
				<category><![CDATA[IT Technology]]></category>
		<category><![CDATA[Publishing]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[system administration]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.grenadepod.com/?p=457</guid>
		<description><![CDATA[No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks. Software development [...]


Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p id="top" />No matter how good developers are (and I trust WordPress developers are one of the best bunch out there) they are still humans and make mistakes. When it comes to a security, one doesn&#8217;t need to make mistakes or introduce bugs in the code to make software or application vulnerable to external attacks.</p>
<p>Software development is really complex process and although  WordPress developers take security very seriously, you should also take extra measures to ensure safety and security of your blog/web site.</p>
<p>There are few simple steps to make your WordPress installation lot harder for attacker to compromise.</p>
<h3>WordPress software</h3>
<p>Always keep up to date. Flaws in security model are being identified and addressed immediately as soon as they are reported. So it&#8217;s important for you to always keep your WordPress installation up to date. It&#8217;s very easy to do now that WordPress has automatic update feature, where all you have to do is just to tell it to install the newer version of it.</p>
<h3>File permissions</h3>
<p>You need to make sure that webserver can modify only those files that it is allowed to. Do not rely on WordPress to enforce this, use file system permission model. All files in WordPress installation need to be owned and writeable to by the user that installed the system and not the user which is used to run webserver. Only exceprion to this is /wp-content/ directory, which contains uploaded contents.</p>
<blockquote><p>Make sure you perform all actions in whatever your WordPress installation directory is, and not outside of it!</p></blockquote>
<p>Let&#8217;s make all files owned by your user and set the group to web server group:</p>
<pre>
$ sudo chown -R myuser.www-data *
</pre>
<p>Then change all file permissions so that files can be written to by your user only, and read-only by other users:</p>
<pre>
$ find . -type d -exec chmod 755 {} \;
$ find . -type f -exec chmod 644 {} \;
</pre>
<p>Finally allow group write for wp-content/ directory, so that web server can do automatic updates for plugins and user content could be uploaded:</p>
<pre>
$ chmod -R g+w *
</pre>
<h3>Secure wp-admin access</h3>
<p>WordPress recommend using additional plugins and HTTP authentication to provide additional security to the administration pages, but I think this is not necessary if you implement the following two security measures: enforce SSL only traffic to /wp-admin/ and allow access only from certain IP addresses.</p>
<p>Make /wp-admin/ available on SSL connection only, so all traffic to and from (including passwords) is encrypted. This prevent attackers hijacking traffic and intercepting passwords and other sensitive data.</p>
<p>This may sound bit complicated, but bear with me, it&#8217;s not that scary as it may look like. So you will need two &lt;VirtualServer&gt; directives: one for normal web traffic and one for SSL.</p>
<p>In default HTTP definition, you then need to make a special case for /wp-admin/ URL, and enforce redirection to HTTPS, so whenever you try to access wp-admin/ using http:// you will be redirected to https:// instead. HTTPS VirtualHost on it turn has instructions to deny access from all, but only the IPs listed in the configuration:</p>
<pre>&lt;VirtualHost server_ip:80&gt;
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin/&gt;
        RewriteEngine on
        RewriteRule ^(.*)$ https://%{SERVER_NAME}/wp-admin/ [R=permanent,L]
    &lt;/Location&gt;
&lt;/VirtualHost&gt; 

&lt;VirtualHost server_ip:443&gt;
    ServerName example.com
    ServerAlias www.example.com
    SSLEngine on
    SSLCertificateFile /etc/ssl/certs/example.com.pem
    SSLCertificateKeyFile /etc/ssl/private/example.com.key
    DocumentRoot /var/www/virtual/www.example.com
    ErrorLog /var/log/apache2/www.example.com-error.log
    CustomLog /var/log/apache2/www.example.com-access.log combined
    &lt;Location /wp-admin&gt;
        Order deny,allow
        Deny from all
        Allow from trusted_ip_1
        Allow from trusted_ip_2
    &lt;/Location&gt;
&lt;/VirtualHost&gt;</pre>
<h3>Other security measures</h3>
<p>Install <a href="http://wordpress.org/extend/plugins/wp-security-scan/" target="_blank">WP Security scan plugin</a> which will provide a good overview of how your installation looks like from the security point of view.</p>
<p>Also remove advertising of the WordPress version that you are using. Add the following line to functions.php file, which you are using:</p>
<pre>
remove_action('wp_head', 'wp_generator');
</pre>
<p>And did I mention that you need to make regular backups?&#8230;</p>


<p>Related posts:<ol><li><a href='http://www.grenadepod.com/2009/11/23/use-ssh-to-upgrade-wordpress-plugins-automatically/' rel='bookmark' title='Permanent Link: Use SSH to upgrade WordPress plugins automatically'>Use SSH to upgrade WordPress plugins automatically</a></li>
<li><a href='http://www.grenadepod.com/2009/11/25/basic-apache-security/' rel='bookmark' title='Permanent Link: Basic Apache security'>Basic Apache security</a></li>
<li><a href='http://www.grenadepod.com/2009/11/06/essential-wordpress-plugins/' rel='bookmark' title='Permanent Link: Essential WordPress plugins'>Essential WordPress plugins</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.grenadepod.com/2009/11/21/securing-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
