<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Ellis Server</title>
	<atom:link href="http://ourserver.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ourserver.wordpress.com</link>
	<description>This is fun</description>
	<lastBuildDate>Thu, 22 Sep 2011 17:55:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='ourserver.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/50ad293a56a874907fcd663da9fe4e1f?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Ellis Server</title>
		<link>http://ourserver.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://ourserver.wordpress.com/osd.xml" title="Ellis Server" />
	<atom:link rel='hub' href='http://ourserver.wordpress.com/?pushpress=hub'/>
		<item>
		<title>New OS!</title>
		<link>http://ourserver.wordpress.com/2009/12/29/new-os/</link>
		<comments>http://ourserver.wordpress.com/2009/12/29/new-os/#comments</comments>
		<pubDate>Tue, 29 Dec 2009 01:15:19 +0000</pubDate>
		<dc:creator>baudday</dc:creator>
				<category><![CDATA[Story]]></category>
		<category><![CDATA[Novell]]></category>
		<category><![CDATA[NOWS]]></category>
		<category><![CDATA[NOWSSBE]]></category>
		<category><![CDATA[SBE]]></category>

		<guid isPermaLink="false">http://ourserver.wordpress.com/?p=83</guid>
		<description><![CDATA[So after a good long while on Ubuntu Server, and after a very long and healthy learning experience, we have decided it is time to give our system an UPGRADE! Some of you probably thought you would never see another post on this blog again, but the truth is, I just haven&#8217;t done much with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=83&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So after a good long while on Ubuntu Server, and after a very long and healthy learning experience, we have decided it is time to give our system an UPGRADE! Some of you probably thought you would never see another post on this blog again, but the truth is, I just haven&#8217;t done much with the server since I wrote that <a href="http://ourserver.wordpress.com/2008/11/05/my-first-cron-job/">Cron Job</a>. I had it set up in a way which was usable, but not very functional. It was handy for uploading/downloading all sorts of media and I was even running a forum for the family on it, but it was lacking. Basic features allowing any computer to automatically back up to the server and useful web applications such as document storage systems were missing.</p>
<p>This week I am undertaking the process of switching to Novell Open Workgroup Suite Small Business Edition, or NOWSSBE for short. You can read more about it <a href="http://www.nowssbe.org/novell-open-small-business-server.php">here</a>, but it basically adds a business element to the server which we were missing with Ubuntu. Now, I know that I could have this same set up with Ubuntu, including the Samba NFS and everything, but I felt like learning a new system and starting completely anew. NOWSSBE seems like a useful system to learn, and I&#8217;m pretty excited to get into it. I have all the files downloaded now and will be installing either tonight or tomorrow. More posts to come!</p>
<p>Note: Opinions on NOWSSBE would be appreciated.</p>
<a href="http://polldaddy.com/poll/2439724/">View This Poll</a>
<br /> Tagged: Novell, NOWS, NOWSSBE, SBE <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ourserver.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ourserver.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ourserver.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=83&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ourserver.wordpress.com/2009/12/29/new-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">baudday</media:title>
		</media:content>
	</item>
		<item>
		<title>My first Cron Job</title>
		<link>http://ourserver.wordpress.com/2008/11/05/my-first-cron-job/</link>
		<comments>http://ourserver.wordpress.com/2008/11/05/my-first-cron-job/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 00:02:10 +0000</pubDate>
		<dc:creator>baudday</dc:creator>
				<category><![CDATA[Story]]></category>
		<category><![CDATA[bash script]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[cron job]]></category>
		<category><![CDATA[cronjob]]></category>
		<category><![CDATA[insert file into several folders]]></category>
		<category><![CDATA[shell script]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu server]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://ourserver.wordpress.com/?p=57</guid>
		<description><![CDATA[So it&#8217;s been a little over a month since I&#8217;ve posted anything, and that&#8217;s cause I&#8217;ve been kind of busy with school, and therefore haven&#8217;t done much with the server. I did install phpBB3, but I didn&#8217;t think that was really worth a mention. What I just got done doing is writing my first shell [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=57&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So it&#8217;s been a little over a month since I&#8217;ve posted anything, and that&#8217;s cause I&#8217;ve been kind of busy with school, and therefore haven&#8217;t done much with the server. I did install phpBB3, but I didn&#8217;t think that was really worth a mention.</p>
<p>What I just got done doing is writing my first shell script and assigning it as a daily cron job. Basically what the job does is run through my Pictures directory&#8211;which I linked to at /var/www/Pictures/&#8211;and places an instance of the file from the &#8220;Image Thumbnails&#8221; post in each of the subdirectories. I did this because I found it annoying to have to constantly check the Pictures directory to see if anyone uploaded any new pictures, and then having to place the file in there myself. So, what the script does is run through all the directory&#8217;s contents and if it finds a directory it changes into that directory and copies a file called noindex.php from the maindirectory into a file called index.php in the directory it&#8217;s in. It then changes back out and continues the process until the entire contents of the folder is processed. Here&#8217;s the script, and a sample output.</p>
<blockquote><p><code>#!/bin/sh<br />
#Script Name: index.sh<br />
#Author Name: Willem Ellis<br />
#Date: Tues Nov 4 17:22:00 CST 2008<br />
#Description: This is a file used to insert<br />
# index.php into newly created<br />
# sub-directories within a main<br />
# directory.<br />
cd /var/www/Pictures/<br />
FILES=*<br />
for f in $FILES<br />
do<br />
if [ -d "$f" ]<br />
then<br />
echo "Processing $f..."<br />
chmod 777 "$f"<br />
cd "$f"<br />
pwd<br />
cat "../noindex.php" &gt; index.php<br />
cd ..<br />
elif [ ! -d "$f" ]<br />
then<br />
echo "Not a directory..."<br />
fi<br />
done</code></p></blockquote>
<blockquote><p>Processing Folder1&#8230;<br />
/var/www/Pictures/Folder1/<br />
Not a directory&#8230;<br />
Processing Folder2&#8230;<br />
/var/www/Pictures/Folder2/</p></blockquote>
<p><a href="http://www.cyberciti.biz/faq/bash-loop-over-file/">This</a> site is where I got a small part of this script, it explains what the for loop does. Basically it stores the list of files within the directory as the variable FILES. The for loop scrolls through the loop and saves each individual item in the list as f and works with each item one at a time until all the items have been processed. It&#8217;s saying for the variable f in the list FILES do the following&#8230; Then my if else if loop just says if the file you are on (f) is a directory change into it and copy noindex.php to index.php inside the directory. Otherwise if (elif) the file is not a directory, print out &#8220;Not a directory&#8230;&#8221; Each time the for loop completes, it moves to the next item and stores that as f until there&#8217;s nothing left in the list, at which point the script is done.</p>
<p>After I wrote the script, all I did was save the script as index.sh in /etc/cron.daily/ and edited /etc/crontab to run the job every day at 6:00PM.</p>
<blockquote><p><code>00 17 * * * root /etc/cron.daily/index.sh</code></p></blockquote>
<p>Hope someone else finds this handy.<br />
<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fourserver.wordpress.com%2F2008%2F11%2F05%2Fmy-first-cron-job%2F&amp;title=My+first+Cron%26nbsp%3BJob"></a></p>
<br /> Tagged: bash script, cron, cron job, cronjob, insert file into several folders, shell script, ubuntu, ubuntu server, unix <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ourserver.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ourserver.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ourserver.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=57&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ourserver.wordpress.com/2008/11/05/my-first-cron-job/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">baudday</media:title>
		</media:content>
	</item>
		<item>
		<title>Image Thumbnails</title>
		<link>http://ourserver.wordpress.com/2008/09/30/image-thumbnails/</link>
		<comments>http://ourserver.wordpress.com/2008/09/30/image-thumbnails/#comments</comments>
		<pubDate>Tue, 30 Sep 2008 05:00:32 +0000</pubDate>
		<dc:creator>baudday</dc:creator>
				<category><![CDATA[Story]]></category>
		<category><![CDATA[generate]]></category>
		<category><![CDATA[generate thumbnails php]]></category>
		<category><![CDATA[image thumbnails]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu server]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://ourserver.wordpress.com/?p=50</guid>
		<description><![CDATA[So I have a directory on my server with several (more than 50) sub-directories filled with pictures. Obviously this is a lot of pictures, and since I did not name the images as I uploaded them, I have no idea what&#8217;s what. I just know where and when they were taken from the folder titles. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=50&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I have a directory on my server with several (more than 50) sub-directories filled with pictures. Obviously this is a lot of pictures, and since I did not name the images as I uploaded them, I have no idea what&#8217;s what. I just know where and when they were taken from the folder titles. I thought something that would generate thumbnails would be great for browsing through the pictures, especially if you were looking for a certain image. So I found this script, and added a two lines that would automatically create a thumbs directory in the Image directory, and that would redirect to the newly generated html page.</p>
<p>Basically what the script does is resize all the .jpg files in the directory, and saves them in the newly created thumbs directory. It then creates a file called gallery.html which shows all the new thumbnails with links to their originals. It does pretty much exactly what I was looking for. Originally the script was called create_thumbs.php, but I renamed it to index.php so it would load each time you opened the folder. In case images had been added. Then I added a redirect line so that it would automatically redirect to gallery.html. This is what I ended up with.<br />
<code>&lt;?php<br />
/*<br />
This is the PHP code for the How to Create Thumbnail Images using PHP Tutorial<br />
This script creates all of the thumbnail images and the gallery.html page.<br />
Note: Make sure that PHP has permission to read and write<br />
to the directory in which .jpg files are stored and the directory<br />
in which you're trying to create thumbnails.<br />
You may use this code in your own projects as long as this<br />
copyright is left in place.  All code is provided AS-IS.<br />
This code is distributed in the hope that it will be useful,<br />
but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.<br />
Copyright 2007 WebCheatSheet.com<br />
*/</p>
<p>header( 'Location: ./gallery.html' ) ;<br />
mkdir("./thumbs", 0777);<br />
function createThumbs( $pathToImages, $pathToThumbs, $thumbWidth )<br />
{</p>
<p>// open the directory<br />
$dir = opendir( $pathToImages );</p>
<p>// loop through it, looking for any/all JPG files:<br />
while (false !== ($fname = readdir( $dir ))) {<br />
// parse path for the extension<br />
$info = pathinfo($pathToImages . $fname);<br />
// continue only if this is a JPEG image<br />
if ( strtolower($info['extension']) == 'jpg' )<br />
{<br />
echo "Creating thumbnail for {$fname} &lt;br /&gt;";</p>
<p>// load image and get image size<br />
$img = imagecreatefromjpeg( "{$pathToImages}{$fname}" );<br />
$width = imagesx( $img );<br />
$height = imagesy( $img );</p>
<p>// calculate thumbnail size<br />
$new_width = $thumbWidth;<br />
$new_height = floor( $height * ( $thumbWidth / $width ) );</p>
<p>// create a new tempopary image<br />
$tmp_img = imagecreatetruecolor( $new_width, $new_height );</p>
<p>// copy and resize old image into new image<br />
imagecopyresized( $tmp_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height );</p>
<p>// save thumbnail into a file<br />
imagejpeg( $tmp_img, "{$pathToThumbs}{$fname}" );<br />
}<br />
}<br />
// close the directory<br />
closedir( $dir );<br />
}</p>
<p>function createGallery( $pathToImages, $pathToThumbs )<br />
{<br />
echo "Creating gallery.html &lt;br /&gt;";</p>
<p>$output = ";<br />
$output .= "&lt;head&gt;&lt;title&gt;Thumbnails&lt;/title&gt;&lt;/head&gt;";<br />
$output .= "&lt;body&gt;";<br />
$output .= "&lt;table cellspacing=\"0\" cellpadding=\"2\" width=\"500\"&gt;";<br />
$output .= "&lt;tr&gt;";</p>
<p>// open the directory<br />
$dir = opendir( $pathToThumbs );</p>
<p>$counter = 0;<br />
// loop through the directory<br />
while (false !== ($fname = readdir($dir)))<br />
{<br />
// strip the . and .. entries out<br />
if ($fname != '.' &amp;&amp; $fname != '..')<br />
{<br />
$output .= "&lt;td valign=\"middle\" align=\"center\"&gt;&lt;a href=\"{$pathToImages}{$fname}\"&gt;";<br />
$output .= "&lt;img src=\"{$pathToThumbs}{$fname}\" border=\"0\" /&gt;";<br />
$output .= "&lt;/a&gt;&lt;/td&gt;";</p>
<p>$counter += 1;<br />
if ( $counter % 4 == 0 ) { $output .= "&lt;/tr&gt;&lt;tr&gt;"; }<br />
}<br />
}<br />
// close the directory<br />
closedir( $dir );</p>
<p>$output .= "&lt;/tr&gt;";<br />
$output .= "&lt;/table&gt;";<br />
$output .= "&lt;br /&gt;";<br />
$output .= "&lt;a href = 'http://thesupportdepartment.com/Pictures/Willem Sr Pictures'&gt;Return To Pictures&lt;/a&gt;";<br />
$output .= "&lt;/body&gt;";<br />
$output .= "&lt;/html&gt;";</p>
<p>// open the file<br />
$fhandle = fopen( "gallery.html", "w" );<br />
// write the contents of the $output variable to the file<br />
fwrite( $fhandle, $output );<br />
// close the file<br />
fclose( $fhandle );<br />
}</p>
<p>// call createThumb function and pass to it as parameters the path<br />
// to the directory that contains images, the path to the directory<br />
// in which thumbnails will be placed and the thumbnail's width.<br />
// We are assuming that the path will be a relative path working<br />
// both in the filesystem, and through the web for links<br />
createThumbs("./","thumbs/",100);<br />
// call createGallery function and pass to it as parameters the path<br />
// to the directory that contains images and the path to the directory<br />
// in which thumbnails will be placed. We are assuming that<br />
// the path will be a relative path working<br />
// both in the filesystem, and through the web for links<br />
createGallery("./","thumbs/");<br />
?&gt;</code><br />
You place it in the folder where the images are located, name it index.php, make sure the folder is chmodded to 777 and when you navigate to that folder, it will create a thumbs directory and the gallery.html file. Then it will redirect to your gallery.</p>
<p>Finally, since I had to place this file in a lot of directories, I placed a copy of the file in the parent directory. Changed to the parent directory, and issued the following Unix command. Then I deleted the copy located in the parent directory.</p>
<blockquote><p>sudo for dir in *; do [ -d "$dir" ] &amp;&amp; cp index.php &#8220;$dir&#8221; ; done</p></blockquote>
<p>I got the script from <a href="http://www.webcheatsheet.com/php/create_thumbnail_images.php">here.</a></p>
<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fourserver.wordpress.com%2F2008%2F09%2F30%2Fimage-thumbnails%2F&amp;title=Image%26nbsp%3BThumbnails"></a>
<br /> Tagged: generate, generate thumbnails php, image thumbnails, php, ubuntu server, web server <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ourserver.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ourserver.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ourserver.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=50&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ourserver.wordpress.com/2008/09/30/image-thumbnails/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">baudday</media:title>
		</media:content>
	</item>
		<item>
		<title>SFTP and SCP</title>
		<link>http://ourserver.wordpress.com/2008/09/23/sftp-and-scp/</link>
		<comments>http://ourserver.wordpress.com/2008/09/23/sftp-and-scp/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 00:39:35 +0000</pubDate>
		<dc:creator>baudday</dc:creator>
				<category><![CDATA[Story]]></category>
		<category><![CDATA[SCP]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[SFTP]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://ourserver.wordpress.com/?p=43</guid>
		<description><![CDATA[So after uploading the majority of what I wanted to the server, I decided it was time to close the ftp port. I read a lot of stuff about it being the most vulnerable point, and one of the first ports hackers try. So I read up on SFTP or Secure FTP, and SCP and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=43&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So after uploading the majority of what I wanted to the server, I decided it was time to close the ftp port. I read a lot of stuff about it being the most vulnerable point, and one of the first ports hackers try. So I read up on SFTP or Secure FTP, and SCP and decided to learn how to use that. Since I had already installed SSH on the server, SFTP and SCP were ready to be used. So I closed the ftp port and have been using these ever since.</p>
<p>SFTP is alright for downloading single files and the way I use it, you can upload music folders pretty easily, since the filenames in a music folder should end in the same extension i.e .mp3. SCP is for downloading directories recursively, so you don&#8217;t have to download each individual file, although I suppose you can use SFTP to download like I use it to upload. Since I haven&#8217;t found something that allows me to recursively upload with either of these (SCP doesn&#8217;t support the put command), I have to improvise a little. Anyway, you can use <a title="this" href="http://kb.iu.edu/data/akqg.html">this</a> source to learn SFTP commands, although if you already know unix, the commands are basically the same. <a href="http://support.hostingplex.com/index.php?_m=knowledgebase&amp;_a=viewarticle&amp;kbarticleid=155">This</a> site on the other hand, explains how to use SCP.</p>
<p>Right now, when I wanna upload a directory with music and it&#8217;s structured:</p>
<blockquote><p>Artist</p>
<p>&#8212;-|_    Album</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8211;|_   Song1.mp3</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Song2.mp3</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; Song3.mp3</p></blockquote>
<p>I do the following. First I create the Artist and Album folders on the remote server. Then I run the following after connecting via SFTP.</p>
<blockquote><p>sftp&gt; put *.mp3</p></blockquote>
<p>The * is a wildcard, which basically says you don&#8217;t care about any characters before that, and then the .mp3 would be what I assume (or know) all the songs in that folder end in. This has proven to work well so far, I still don&#8217;t have a solution for directories with various types of files. I&#8217;m open to some suggestions.</p>
<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fourserver.wordpress.com%2F2008%2F09%2F23%2Fsftp-and-scp%2F&amp;title=SFTP+and%26nbsp%3BSCP"></a>
<br /> Tagged: SCP, server, SFTP, ubuntu <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ourserver.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ourserver.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ourserver.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=43&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ourserver.wordpress.com/2008/09/23/sftp-and-scp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">baudday</media:title>
		</media:content>
	</item>
		<item>
		<title>A better way!</title>
		<link>http://ourserver.wordpress.com/2008/09/20/a-better-way/</link>
		<comments>http://ourserver.wordpress.com/2008/09/20/a-better-way/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 17:01:35 +0000</pubDate>
		<dc:creator>baudday</dc:creator>
				<category><![CDATA[Story]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[httpd.conf]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[web server]]></category>

		<guid isPermaLink="false">http://ourserver.wordpress.com/?p=38</guid>
		<description><![CDATA[Well, I was told by a reader that .htaccess is not a very secure way to block off parts of your website. Since I am busy learning everything for the first time, I was willing to take his advice and was able to use httpd.conf to restrict access. Also, he showed me a way that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=38&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Well, I was told by a reader that .htaccess is not a very secure way to block off parts of your website. Since I am busy learning everything for the first time, I was willing to take his advice and was able to use httpd.conf to restrict access. Also, he showed me a way that sends passwords encrypted, rather than in plain text. Anyway, I&#8217;d like to thank Bob for this advice, and here is a much better way to block off parts of your site&#8230;<br />
(Please note the following is directly quoted from Bob&#8217;s comments as to not take credit for this myself.)</p>
<blockquote><p>You should never use .htaccess files unless you don’t own the server and don’t have access to the main server configuration file (httpd.conf).</p>
<p>See the Apache documentation article When (not) to use .htaccess files: <a rel="nofollow" href="http://httpd.apache.org/docs/2.2/howto/htaccess.html#when">http://httpd.apache.org/docs/2.2/howto/htaccess.html#when</a></p>
<p>Basically, httpd.conf would, in your case, look something like:</p>
<p>&lt;Directory&gt;</p>
<p>AuthType Basic<br />
AuthName “SECRET SQUIRREL RESTRICTED ACCESS AREA”<br />
AuthUserFile /etc/apache2/passwd/passwords<br />
Require valid-user</p>
<p>&lt;/Directory&gt;</p>
<p>The /var/www/music is the directory you want to password.<br />
AuthType Basic is basic HTTP authentication, as opposed to AuthType Digest which uses MD5 authentication.<br />
AuthName is simply the text that will be displayed in the password request box.<br />
AuthUserFile is where the passwords are stored, which you create using the htpasswd command.<br />
And finally, Require valid-user means that anyone in the password file can get in. Or, you can specify a particular name, such as Require Willem.</p>
<p>See Apache access control for more info: <a rel="nofollow" href="http://httpd.apache.org/docs/2.2/howto/auth.html#gettingitworking">http://httpd.apache.org/docs/2.2/howto/auth.html#gettingitworking</a></p>
<p>Bob</p></blockquote>
<blockquote><p>But wait! There’s an even better way!</p>
<p>AuthType Basic sends the password in clear text, so it’s fairly unsecure. AuthType Digest uses a little bit of encryption with an MD5 checksum and a once-used number and does not send the password in clear text, so it’s more secure.</p>
<p>And, since AuthType Digest is really no harder to use than AuthType Basic, you might as well get the enhanced security. The only real drawback that I see with AuthType Digest is that really old browsers don’t support it. But unless you’re using a browser from 2004, that’s not much of a problem <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /></p>
<p>Anyway, AuthType Digest is really similar to AuthType Basic except that the way you create a password is slightly different and the httpd.conf entry refers to ‘Digest’, rather than ‘Basic’.</p>
<p>For example, to use AuthType Digest to password-protect the ‘private’ realm and directory /var/www/music and only let in user Joe. First, create a password for joe:</p>
<p>htdigest -c /etc/apache2/passwordfile private joe<br />
(note: location of password file is just an example and doesn’t have to be at that location or use that file name)</p>
<p>Then edit httpd.conf file to require password to access /var/www/music:</p>
<p>&lt;Directory /var/www/music&gt;<br />
AuthType Digest<br />
AuthName “private”<br />
AuthDigestDomain /music/<br />
AuthUserFile /etc/apache2/passwordfile<br />
Require user joe<br />
&lt;/Directory&gt;<br />
(Note: replace ( and ) with in the real httpd.conf file. I just used parentheses here so the HTML wouldn’t be stripped out by the blog software).</p>
<p>See here for more techie details: <a rel="nofollow" href="http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html">http://httpd.apache.org/docs/2.2/mod/mod_auth_digest.html</a></p>
<p>Good luck, and enjoy your Ubuntu server! I sure enjoy mine! <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /></p>
<p>Bob</p></blockquote>
<blockquote><p>One more thing on Digest. It is an Apache mod-file, which Ubuntu does not have enabled by default.</p>
<p>If you look in /etc/apache2/mods-available, you will see it: auth_digest.load</p>
<p>But, if you look in /etc/apache2/mods-enabled, it isn’t there by default in Ubuntu server.</p>
<p>But enabling it is easy. If you notice that in /etc/apache2/mods-enabled there aren’t actually any files, just symbolic links to the /etc/apache2/mods-available directory (do an ls -l). So, to enable the auth_digest.load, all you have to do is create a symbolic link like so:</p>
<p>cd /etc/apache2/mods-enabled<br />
sudo ln -s ../mods-available/auth_digest.load auth_digest.load</p>
<p>Then restart Apache:<br />
sudo /etc/init.d/apache2 restart</p>
<p>Have fun! <img class="wp-smiley" src="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" alt=")" /></p>
<p>Bob</p></blockquote>
<p>I can verify that this did indeed work, and once again, thanks to Bob for showing me a better way.</p>
<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fourserver.wordpress.com%2F2008%2F09%2F20%2Fa-better-way%2F&amp;title=A+better%26nbsp%3Bway%21"></a>
<br /> Tagged: htaccess, httpd.conf, server, ubuntu, web server <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/ourserver.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/ourserver.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/ourserver.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=ourserver.wordpress.com&amp;blog=4456916&amp;post=38&amp;subd=ourserver&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://ourserver.wordpress.com/2008/09/20/a-better-way/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">baudday</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>

		<media:content url="http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif" medium="image">
			<media:title type="html">)</media:title>
		</media:content>
	</item>
	</channel>
</rss>
