<?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>9thport</title>
	<atom:link href="http://9thport.net/feed" rel="self" type="application/rss+xml" />
	<link>http://9thport.net</link>
	<description>organization, programming, photography, technical news I find interesting</description>
	<lastBuildDate>Thu, 12 Jan 2012 02:13:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>When having problems with Gitosis on Ubuntu</title>
		<link>http://9thport.net/2012/01/09/when-having-problems-with-gitosis-on-ubuntu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=when-having-problems-with-gitosis-on-ubuntu</link>
		<comments>http://9thport.net/2012/01/09/when-having-problems-with-gitosis-on-ubuntu/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 23:41:47 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1520</guid>
		<description><![CDATA[Problems with gitosis While working on my Ubuntu server with the Gitosis default setup, I ran into some problems along the way when trying to commit some changes: Lost ability to update the gitosis-admin repository Various python errors Expected changes &#8230; <a href="http://9thport.net/2012/01/09/when-having-problems-with-gitosis-on-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h3>Problems with gitosis</h3>
<p>While working on my Ubuntu server with the Gitosis default setup, I ran into some problems along the way when trying to commit some changes:</p>
<ol>
<li>Lost ability to update the gitosis-admin repository</li>
<li>Various python errors</li>
<li>Expected changes to gitosis.conf file but they were not being applied</li>
</ol>
<p>Below is a description of what I did to trace down the error(s) and try to fix them.</p>
<h3>Gitosis debug</h3>
<p>Setting the debug into the gitosis.conf file really helped me out. To achieve this, you must have the following in your gitosis.conf file:</p>
<pre>[gitosis]
loglevel = DEBUG</pre>
<p>After this has been setup, you can run your push command to get a better idea of what is going wrong. Some of the problems I got are listed below with a explanation of what I did to try and resolve the issue:</p>
<h3>gitosis.conf not updated after a push</h3>
<p>This was a mystery. I cloned off the files from the gitosis-admin repo and then made some changes to the gitosis.conf file. Then after pushing them to the origin master, I noticed my changes did not take effect when looking at the file:</p>
<pre>cat /srv/gitosis/.gitosis.conf</pre>
<p>I noticed that there is a hook file in the directory of</p>
<pre>/srv/gitosis/repositories/gitosis-admin.git/hooks/</pre>
<p>with the filename of:</p>
<pre>/usr/share/pyshared/gitosis/templates/admin/hooks/post-update</pre>
<p>(Small note here, take note of the directory of where this file is because the part of /usr/share/pyshared is what you need for setting your PYTHONPATH) Running the above script occurs after applying a push to the gitosis-admin repository. I figured this was where the hold up was. After running this script manually, I got more errors (which I don&#8217;t have any more) and here is what you need to do to run this script:</p>
<pre>sudo su
su gitosis
export set GIT_DIR="/srv/gitosis/repositories/gitosis-admin.git"
export set PYTHONPATH="/usr/share/pyshared"
/usr/share/pyshared/gitosis/templates/admin/hooks/post-update</pre>
<p>That is, goto root account with sudo. Change users to gitosis. Set some variables (GIT_DIR, and PYTHONPATH). Then run script. This might give you more insight of to why the gitosis.conf file is not being updated.</p>
<h3>Lost access to gitosis.conf file</h3>
<p>This happened to me. Any commit I made to the gitosis-admin repo resulted in a permissions denied. So I logged on to my server, changed directories over to /srv/gitosis and edited the</p>
<pre>.gitosis.conf</pre>
<p>file and all was okay.</p>
<h3>PERMISSION problems</h3>
<p>Most of the time this was because the files in /srv/gitosis were not group writeable by the group of &#8216;gitosis&#8217;, or my account did not belong to the group &#8216;gitosis&#8217;, or that the ssh configuration file did not allow my account to login via ssh.</p>
<h3>conclusion</h3>
<p>Most of the time gitosis worked great. But sometimes, it did not work out. I hope this document will save me in the future as well as others. A really nice resource for gitosis can be found at http://ao2.it/wiki/How_to_setup_a_GIT_server_with_gitosis_and_gitweb</p>
<p>Cheers,</p>
<p>Aaron</p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2012/01/09/when-having-problems-with-gitosis-on-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Verifying all entries in /etc/shells are not more permissive than 755</title>
		<link>http://9thport.net/2011/12/12/verifying-all-entries-in-etcshells-are-not-more-permissive-than-755/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=verifying-all-entries-in-etcshells-are-not-more-permissive-than-755</link>
		<comments>http://9thport.net/2011/12/12/verifying-all-entries-in-etcshells-are-not-more-permissive-than-755/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 03:16:33 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1502</guid>
		<description><![CDATA[I wanted to make sure that all the files listed in /etc/shells were not more permissive than 755, but I kept running into a problem of trying to analyze the permissions on a file that is a link. After digging &#8230; <a href="http://9thport.net/2011/12/12/verifying-all-entries-in-etcshells-are-not-more-permissive-than-755/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I wanted to make sure that all the files listed in /etc/shells were not more permissive than 755, but I kept running into a problem of trying to analyze the permissions on a file that is a link. After digging around, I found out about a command called</p>
<pre>readlink</pre>
<p>which prints the full path of the file that the link is point at. So I came up with some bash shell code to do the job:</p>
<h3> Bash Script checking permissions</h3>
<pre>for f in `cat /etc/shells`
do
	#echo "checking $f"
	if [ -e $f ]; then

	if [ -L $f ]; then
		f=`readlink -f $f`
		results=`stat -c "%a" $f`
	else
		results=`stat -c "%a" $f`
	fi

	if [[ "$results" -le "755"  ]]; then
		echo "--- passed =&gt; $results - $f"
	else
		echo "-X- Failed =&gt; $results - $f"
	fi

	else
	echo "missing"
	fi
done</pre>
<h3>Explanation of bash script checking permissions</h3>
<p>For all the text lines returned from &#8220;cat /etc/shells&#8221;, process a loop while setting each line from the text file /etc/shells as a variable of &#8220;f&#8221;. The first if statement checks to see if the file exists. The second if statement checks if the file in &#8220;f&#8221; is a link and if so, reassign the variable &#8220;f&#8221; to the returned value from running &#8220;readlink -f $f&#8221; then process the file with stat to get the octal value of permissions. If the file is not a link, try to process the file with stat to get the octal value. The next if statement checks to see the file in $f is less than or equal to 755. If the octal value is less than or equal to 755, a line will be printed indicating the file has passed the test. If the octal value is more than 755, a line will be printed indicating the file has not passed the test.</p>
<p>Here is a sample output from one of my servers:</p>
<pre>--- passed =&gt; 755 - /bin/bash
--- passed =&gt; 755 - /bin/bash
--- passed =&gt; 755 - /sbin/nologin
--- passed =&gt; 755 - /bin/ash
--- passed =&gt; 755 - /bin/ash
--- passed =&gt; 755 - /bin/ksh
--- passed =&gt; 755 - /bin/ksh
--- passed =&gt; 755 - /bin/ksh
--- passed =&gt; 755 - /bin/tcsh
--- passed =&gt; 755 - /bin/tcsh
--- passed =&gt; 755 - /bin/zsh</pre>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/12/12/verifying-all-entries-in-etcshells-are-not-more-permissive-than-755/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Odin&#8217;s Tipple</title>
		<link>http://9thport.net/2011/11/30/odins-tipple/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=odins-tipple</link>
		<comments>http://9thport.net/2011/11/30/odins-tipple/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 01:27:06 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/2011/11/30/odins-tipple/</guid>
		<description><![CDATA[Trying a bottled beer called Odin&#8217;s Tipple and it&#8217;s like nothing I have ever had!]]></description>
			<content:encoded><![CDATA[<p>Trying a bottled beer called Odin&#8217;s Tipple and it&#8217;s like nothing I have ever had!</p>
<p><a href="http://9thport.net/wp-content/uploads/2011/11/20111130-202648.jpg"><img src="http://9thport.net/wp-content/uploads/2011/11/20111130-202648.jpg" alt="20111130-202648.jpg" class="alignnone size-full" /></a></p>
<p><a href="http://9thport.net/wp-content/uploads/2011/11/20111130-202657.jpg"><img src="http://9thport.net/wp-content/uploads/2011/11/20111130-202657.jpg" alt="20111130-202657.jpg" class="alignnone size-full" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/11/30/odins-tipple/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Taking a break</title>
		<link>http://9thport.net/2011/11/29/taking-a-break/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=taking-a-break</link>
		<comments>http://9thport.net/2011/11/29/taking-a-break/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 18:16:13 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/2011/11/29/taking-a-break/</guid>
		<description><![CDATA[Having a good time at lunch at an Irish pub in my hotel. Your browser does not support the video tag]]></description>
			<content:encoded><![CDATA[<p>Having a good time at lunch at an Irish pub in my hotel. </p>
<p><video src="http://9thport.net/wp-content/uploads/2011/11/20111129-131222.mov" controls="controls" width="360" height="480">Your browser does not support the video tag</video></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/11/29/taking-a-break/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://9thport.net/wp-content/uploads/2011/11/20111129-131222.mov" length="4414536" type="video/quicktime" />
		</item>
		<item>
		<title>RedMine due date with offset value</title>
		<link>http://9thport.net/2011/11/18/redmine-due-date-with-offset-value/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=redmine-due-date-with-offset-value</link>
		<comments>http://9thport.net/2011/11/18/redmine-due-date-with-offset-value/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 21:52:22 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1489</guid>
		<description><![CDATA[Another RedMine plugin of mine to automatically set the due date with a specified offset. So here is my github repo with the plugin necessary to fill in the due date for all projects. I have some plans to improve the plugin into &#8230; <a href="http://9thport.net/2011/11/18/redmine-due-date-with-offset-value/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Another RedMine plugin of mine to automatically set the due date with a specified offset. So here is my <a title="Redmine-due-date-offset" href="https://github.com/9thport/redmine-due-date-offset">github repo</a> with the plugin necessary to fill in the due date for all projects. I have some plans to improve the plugin into being a module for custom project based settings. Perhaps some settings of setting the offset value in a field and a checkbox for making sure it falls on a weekday or not.</p>
<p><a href="https://github.com/9thport/redmine-due-date-offset">Redmine-due-date-offset</a></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/11/18/redmine-due-date-with-offset-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion error message File Not Found</title>
		<link>http://9thport.net/2011/10/24/coldfusion-error-message-file-not-found/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=coldfusion-error-message-file-not-found</link>
		<comments>http://9thport.net/2011/10/24/coldfusion-error-message-file-not-found/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 15:04:10 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1485</guid>
		<description><![CDATA[If you are staring at a error message produced by ColdFusion that reads &#8220;File Not Found&#8221; but you know the file is available from you Linux apache service, you would be having a similar day that I had last week. &#8230; <a href="http://9thport.net/2011/10/24/coldfusion-error-message-file-not-found/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you are staring at a error message produced by ColdFusion that reads &#8220;File Not Found&#8221; but you know the file is available from you Linux apache service, you would be having a similar day that I had last week. While searching around on the net, I found many many other posts that described this same problem, and their solutions where of no help. Most these articles talked about having the correct installation, disabling caching, or applied to an earlier version of ColdFusion, but I could not find any solution that applied to my situation:</p>
<p>I have many virtual hosts in Apache on a Linux server with two virtual hosts serving CFM files correctly from a ColFusion Multisite installation. But any new virtual hosts would produce the error &#8220;File not Found&#8221;.</p>
<p>This message is very deceiving, but I noticed that in the directory of:</p>
<p>/opt/jrun4/servers/cfusion/cfusion-ear/cfusion-war/</p>
<p>there is a CFM file, then the file is located. Bizarre! Anyways, the solution to this problem was really simple but I was thrown off by the error message. The solution is to make sure the ColdFusion user has executable rights on the directory being provided by Apache. </p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/10/24/coldfusion-error-message-file-not-found/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>node.js how to pipe a output from child process into a webpage</title>
		<link>http://9thport.net/2011/10/16/how-to-pipe-a-output-from-child-process-into-a-webpage/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-pipe-a-output-from-child-process-into-a-webpage</link>
		<comments>http://9thport.net/2011/10/16/how-to-pipe-a-output-from-child-process-into-a-webpage/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 02:32:17 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1475</guid>
		<description><![CDATA[This is a simple Node.js server that prints the output from a system command (in this example, its a tail program): // how to pipe a output from child process into a webpage // start with importing an http server &#8230; <a href="http://9thport.net/2011/10/16/how-to-pipe-a-output-from-child-process-into-a-webpage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is a simple Node.js server that prints the output from a system command (in this example, its a tail program):</p>
<pre>// how to pipe a output from child process into a webpage

// start with importing an http server
var http = require('http');
// import the spawn function
var spawn = require('child_process').spawn;

// create the server bound to port at bottom
http.createServer(function(request, response) {
	// write the header with 200 okay with content-type
	response.writeHead(200, {
		'Content-Type': 'text/plain'
	});

	// everytime there is a new request, spawn an child process
	var tail_child = spawn('tail', ['-f', '/var/log/system.log']);

	// kill tail_child everytime the connection ends to keep from many processes being created
	request.connection.on('end', function() {
		tail_child.kill();
	})

	// observe the output by binding to the data event
	//
	// because javascript is not good at handling buffers, use the function for buffering data
	tail_child.stdout.on('data', function(data) {
		// write it on the console
		console.log(data.toString());
		// send it to the browser because the browser will be waiting for the next chunk of data
		response.write(data);
	});

}).listen(4000);</pre>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/10/16/how-to-pipe-a-output-from-child-process-into-a-webpage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>node.js hello world example with simple bootstrap</title>
		<link>http://9thport.net/2011/10/16/node-js-hello-world-example-with-simple-bootstrap/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=node-js-hello-world-example-with-simple-bootstrap</link>
		<comments>http://9thport.net/2011/10/16/node-js-hello-world-example-with-simple-bootstrap/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 01:56:11 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1471</guid>
		<description><![CDATA[My first step into learning about Node.js and I here is my hello world example: &#160; &#160; var http = require(&#8216;http&#8217;) http.createServer(function(request, response) { console.log(&#8216;new request&#8217;); response.writeHead(200, { &#8216;Content-Type&#8217;: &#8216;text/plain&#8217; }); response.end(&#8216;Hello World!&#8217;); }).listen(4000);]]></description>
			<content:encoded><![CDATA[<p>My first step into learning about Node.js and I here is my hello world example:</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
var http = require(&#8216;http&#8217;)</p>
<p>http.createServer(function(request, response) {<br />
	console.log(&#8216;new request&#8217;);<br />
	response.writeHead(200, {<br />
		&#8216;Content-Type&#8217;: &#8216;text/plain&#8217;<br />
	});<br />
	response.end(&#8216;Hello World!&#8217;);</p>
<p>}).listen(4000);</p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/10/16/node-js-hello-world-example-with-simple-bootstrap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unknown number? why are you calling me!?</title>
		<link>http://9thport.net/2011/10/12/unknown-number-why-are-you-calling-me/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unknown-number-why-are-you-calling-me</link>
		<comments>http://9thport.net/2011/10/12/unknown-number-why-are-you-calling-me/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 02:39:45 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1468</guid>
		<description><![CDATA[Just a small post about a website I just found for finding out about those mysterious phone numbers: http://whocallsme.com/]]></description>
			<content:encoded><![CDATA[<p>Just a small post about a website I just found for finding out about those mysterious phone numbers:</p>
<p><a href="http://whocallsme.com/">http://whocallsme.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/10/12/unknown-number-why-are-you-calling-me/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awk if statement for testing permissions of files and directories</title>
		<link>http://9thport.net/2011/10/12/awk-if-statement-for-testing-permissions-of-files-and-directories/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=awk-if-statement-for-testing-permissions-of-files-and-directories</link>
		<comments>http://9thport.net/2011/10/12/awk-if-statement-for-testing-permissions-of-files-and-directories/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 15:36:39 +0000</pubDate>
		<dc:creator>aaron</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://9thport.net/?p=1464</guid>
		<description><![CDATA[By using stat and awk, you can gather some information for passing or failing a permissions check. Below is a bash script snippet I used for checking all the home directories in /etc/passwd to make sure they are at permissions level &#8230; <a href="http://9thport.net/2011/10/12/awk-if-statement-for-testing-permissions-of-files-and-directories/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>By using stat and awk, you can gather some information for passing or failing a permissions check. Below is a bash script snippet I used for checking all the home directories in /etc/passwd to make sure they are at permissions level of 755 or less. I am sure there is a better way of doing this and this might not work for people who have the sticky bit set, but for now it gets the job done:</p>
<pre>stat -c "%a %n" `awk -F":" '{print $6}' /etc/passwd` | awk '{
if ($1 &lt;= 755 )
  print "--- pass","=&gt;",$0;
else
  print "+++ Fail","=&gt;",$0;
}'</pre>
<pre></pre>
]]></content:encoded>
			<wfw:commentRss>http://9thport.net/2011/10/12/awk-if-statement-for-testing-permissions-of-files-and-directories/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

