<?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>&#60;Code Zen /&#62; &#187; bash</title>
	<atom:link href="http://www.code-zen.net/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.code-zen.net</link>
	<description>Peter Anselmo&#039;s Home on the Web</description>
	<lastBuildDate>Wed, 12 Oct 2011 01:11:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Ubuntu Server Setup Checklist</title>
		<link>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/</link>
		<comments>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/#comments</comments>
		<pubDate>Sun, 21 Jun 2009 01:51:50 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ufw]]></category>
		<category><![CDATA[vim]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.code-zen.net/?p=281</guid>
		<description><![CDATA[I&#8217;ve now set up half a dozen or so Ubuntu Server installations over the past year or two.  For the last few, I created a checklist to make sure I don&#8217;t leave any of the smaller, less obvious things out.  I present it here, completely unmodified.  Note, this is more of a preliminary checklist, as [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-290" title="Ubuntu Logo" src="http://www.code-zen.net/wp-content/uploads/2009/06/ubu.gif" alt="" width="70" height="68" />I&#8217;ve now set up half a dozen or so Ubuntu Server installations over the past year or two.  For the last few, I created a checklist to make sure I don&#8217;t leave any of the smaller, less obvious things out.  I present it here, completely unmodified.  Note, this is more of a preliminary checklist, as it doesn&#8217;t include installation of Apache, MySql, PHP or any other programs such as Postfix.  Basically, I&#8217;ll perform these steps regardless of whether It&#8217;ll be a web or mail server.  These also assume you like the vi text editor, if not, you can substitute emacs, nano, or whatever your preference when neccesary.  Also, some of these are already done depending on your server host.</p>
<p><span style="text-decoration: underline;">Time/Date/Language</span><br />
Fix Locale Warnings:<br />
# apt-get install language-pack-en</p>
<p>Set Timezone:<br />
# dpkg-reconfigure tzdata</p>
<p>Install Time Daemon:<br />
# apt-get install ntp</p>
<p><span style="text-decoration: underline;">General</span><br />
Install Manual Pages:<br />
# apt-get install man</p>
<p>Add Domain name<br />
# vi /etc/hosts<br />
127.0.0.1	localhost<br />
123.456.789.012	computername.domain.com	computername (replace external ip)</p>
<p><span style="text-decoration: underline;">Security</span><br />
Add Administrative User (with home directory):<br />
# useradd myusername -m</p>
<p>Give Admin user Sudo Powers<br />
# visudo<br />
myusername ALL=(ALL) ALL</p>
<p>Set Admin Password<br />
# passwd myusername</p>
<p>Set Admin Shell Preference (optional)<br />
# vi /etc/passwd<br />
myusername: [...] :bash</p>
<p>Disable Root SSH Login:<br />
# vi /etc/ssh/sshd_config<br />
PermitRootLogin	no &lt;&#8211;MAKE SURE YOU CREATED ADMIN &amp; PASSWORD</p>
<p>Tighten default permissions for file &amp; directory creation:<br />
# vi /etc/profile<br />
umask	027 (no default access for others)</p>
<p>Install and Set Up Firewall<br />
# apt-get install ufw<br />
# ufw allow ssh &lt;&#8211;DO NOT FORGET THIS<br />
# ufw enable</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;headline=Ubuntu+Server+Setup+Checklist" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=Ubuntu+Server+Setup+Checklist&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=Ubuntu+Server+Setup+Checklist&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F&amp;title=Ubuntu+Server+Setup+Checklist&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fubuntu-server-setup-checklist%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/ubuntu-server-setup-checklist/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Sticky Bit</title>
		<link>http://www.code-zen.net/2009/sticky-bit/</link>
		<comments>http://www.code-zen.net/2009/sticky-bit/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 06:50:48 +0000</pubDate>
		<dc:creator>Peter Anselmo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[permissions]]></category>

		<guid isPermaLink="false">http://code-zen.net/?p=189</guid>
		<description><![CDATA[Just about any linux user is familiar with the unix permission system. You have three categories of users (user, group, other) and three different permission options (read, write execute). However, most users don&#8217;t know about several advanced permissions, one of which is the sticky bit. Besides having a cool name, the sticky bit provides a [...]]]></description>
			<content:encoded><![CDATA[<p>Just about any linux user is familiar with the unix permission system.  You have three categories of users (user, group, other) and three different permission options (read, write execute).  However, most users don&#8217;t know about several advanced permissions, one of which is the sticky bit.</p>
<p>Besides having a cool name, the sticky bit provides a very useful function: when set as a directory permission it lets anyone add things the the directory (write access), but they can only delete things they own.  Normally, allowing all users write access also allows all users to delete anything (yeah, that&#8217;s dangerous).</p>
<p>In particular, users can only remove files if at least one of the following is true:<br />
-The user is the owner of the file<br />
-The user is the owner of the parent directory<br />
-The user has write permissions on the file</p>
<p>When is this useful?  It&#8217;s commonly found in var directories, when everyone needs to be able to create files, but shouldn&#8217;t modify files for other users.  It&#8217;s also common in mailbox directories for the same reason.  I found it particularly useful for a media folder that is shared between users.  Users can add Pictures and Videos to the folder, but can&#8217;t delete those belonging to others.</p>
<p>So how do you set it?<br />
-For chmod in relative mode, the sticky bit is designated by a &#8220;t&#8221;</p>
<pre># chmod t filename</pre>
<p>-For chmod in absolute mode, the sticky bit can be added by prepending a &#8220;1&#8243; the the permission.</p>
<pre>#chmod 1777 dirname</pre>
<p>Cool huh?</p>
<div class="lightsocial_container"><a class="lightsocial_a" href="http://digg.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F&amp;title=The+Sticky+Bit" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/digg.png" alt="Digg This" title="Digg This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.reddit.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F&amp;title=The+Sticky+Bit" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/reddit.png" alt="Reddit This" title="Reddit This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F&amp;title=The+Sticky+Bit" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/stumbleupon.png" alt="Stumble Now!" title="Stumble Now!" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://buzz.yahoo.com/buzz?targetUrl=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F&amp;headline=The+Sticky+Bit" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/yahoo_buzz.png" alt="Buzz This" title="Buzz This" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dzone.com/links/add.html?title=The+Sticky+Bit&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dzone.png" alt="Vote on DZone" title="Vote on DZone" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.facebook.com/sharer.php?t=The+Sticky+Bit&amp;u=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/facebook.png" alt="Share on Facebook" title="Share on Facebook" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://delicious.com/save?title=The+Sticky+Bit&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/delicious.png" alt="Bookmark this on Delicious" title="Bookmark this on Delicious" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.dotnetkicks.com/kick/?title=The+Sticky+Bit&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetkicks.png" alt="Kick It on DotNetKicks.com" title="Kick It on DotNetKicks.com" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://dotnetshoutout.com/Submit?title=The+Sticky+Bit&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/dotnetshoutout.png" alt="Shout it" title="Shout it" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F&amp;title=The+Sticky+Bit&amp;summary=&amp;source=" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/linkedin.png" alt="Share on LinkedIn" title="Share on LinkedIn" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/technorati.png" alt="Bookmark this on Technorati" title="Bookmark this on Technorati" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://twitter.com/home?status=Reading+http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/twitter.png" alt="Post on Twitter" title="Post on Twitter" /></a>&nbsp;&nbsp;<a class="lightsocial_a" href="http://www.google.com/buzz/post?url=http%3A%2F%2Fwww.code-zen.net%2F2009%2Fsticky-bit%2F" ><img class="lightsocial_img" src="http://www.code-zen.net/wp-content/plugins/light-social/google_buzz.png" alt="Google Buzz (aka. Google Reader)" title="Google Buzz (aka. Google Reader)" /></a>&nbsp;&nbsp;</div>]]></content:encoded>
			<wfw:commentRss>http://www.code-zen.net/2009/sticky-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

