<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for The Dave'nci Code</title>
	<link>http://davelozier.com</link>
	<description>Listening to Black Sabath at 78 speed...</description>
	<pubDate>Thu, 11 Mar 2010 09:14:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by Dave</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-2080</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Mon, 13 Jul 2009 04:11:51 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-2080</guid>
		<description>Hey Scott! Sorry for the late reply on this. If you set chrootpath to another destination it may possibly not have had the permissions to create the path structure. You can perhaps create them manually after the fact and see if that allows everything else to fall into place. Please let me know how it goes. Thanks!</description>
		<content:encoded><![CDATA[<p>Hey Scott! Sorry for the late reply on this. If you set chrootpath to another destination it may possibly not have had the permissions to create the path structure. You can perhaps create them manually after the fact and see if that allows everything else to fall into place. Please let me know how it goes. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by Scott</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1975</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Thu, 09 Jul 2009 21:32:08 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1975</guid>
		<description>Dave

I followed your instruction but failed to get it to work. I suspect that the "~/mkchroot.sh" didn't quite get made executable successfully. I don't see the "$jail_dir" directory. I set the chrootpath to my desired rather than /home/chroot. Does the chrootpath have to be /home/chroot? How do I make sure that ~/mkchroot.sh gets made executable successfully?

Scott</description>
		<content:encoded><![CDATA[<p>Dave</p>
<p>I followed your instruction but failed to get it to work. I suspect that the &#8220;~/mkchroot.sh&#8221; didn&#8217;t quite get made executable successfully. I don&#8217;t see the &#8220;$jail_dir&#8221; directory. I set the chrootpath to my desired rather than /home/chroot. Does the chrootpath have to be /home/chroot? How do I make sure that ~/mkchroot.sh gets made executable successfully?</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by Dave</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1065</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 10 Jun 2009 02:26:32 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1065</guid>
		<description>Hi Charlie,

You may possibly need a symbolic link to sftp-server.

sudo ln /home/chroot/usr/lib/openssh/sftp-server /home/chroot/usr/lib/

Check the path with rssh -v as well.

Please let me know if that cures it. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi Charlie,</p>
<p>You may possibly need a symbolic link to sftp-server.</p>
<p>sudo ln /home/chroot/usr/lib/openssh/sftp-server /home/chroot/usr/lib/</p>
<p>Check the path with rssh -v as well.</p>
<p>Please let me know if that cures it. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by Charlie</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1045</link>
		<dc:creator>Charlie</dc:creator>
		<pubDate>Mon, 08 Jun 2009 01:50:12 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-1045</guid>
		<description>I just followed your tutorial for a Hardy server running on Amazon's Elastic Compute Cloud, but I'm running in to trouble- my chrooted users can not log in: they get an error: "Fatal: unable to initialise SFTP on server: could not connect" while other users remain just fine. I'm having trouble finding the problem via Google, any ideas?</description>
		<content:encoded><![CDATA[<p>I just followed your tutorial for a Hardy server running on Amazon&#8217;s Elastic Compute Cloud, but I&#8217;m running in to trouble- my chrooted users can not log in: they get an error: &#8220;Fatal: unable to initialise SFTP on server: could not connect&#8221; while other users remain just fine. I&#8217;m having trouble finding the problem via Google, any ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by Dave</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-564</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Tue, 19 May 2009 04:11:43 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-564</guid>
		<description>Hey Corey!

The SFTP users will have access to everything in /home/chroot but they should not be able to leave the /home/chroot area. When trying to SSH in do you get disconnected with a notice that the account is limited to SFTP only? If so then that's a good sign things are working. (along with not being able to leave /home/chroot)

Cheers,
~Dave</description>
		<content:encoded><![CDATA[<p>Hey Corey!</p>
<p>The SFTP users will have access to everything in /home/chroot but they should not be able to leave the /home/chroot area. When trying to SSH in do you get disconnected with a notice that the account is limited to SFTP only? If so then that&#8217;s a good sign things are working. (along with not being able to leave /home/chroot)</p>
<p>Cheers,<br />
~Dave</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Chrooted SFTP on Ubuntu Hardy AMD64 using RSSH by corey</title>
		<link>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-561</link>
		<dc:creator>corey</dc:creator>
		<pubDate>Mon, 18 May 2009 23:26:56 +0000</pubDate>
		<guid>http://davelozier.com/2008/11/16/chroot-sftp-ubuntu-hardy-amd64/#comment-561</guid>
		<description>I followed your howto, but i keep stumbling onto one problem.  The sftp user has access to all the files from /home/chroot on up...  Including any additional users that you add later.  How did you go about restricting the users to their /home/chroot/home directory without breaking their ability to log into the sftp?

Please let me know.

Thanks

Corey</description>
		<content:encoded><![CDATA[<p>I followed your howto, but i keep stumbling onto one problem.  The sftp user has access to all the files from /home/chroot on up&#8230;  Including any additional users that you add later.  How did you go about restricting the users to their /home/chroot/home directory without breaking their ability to log into the sftp?</p>
<p>Please let me know.</p>
<p>Thanks</p>
<p>Corey</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AWstats with Vlogger Rotation by Dave</title>
		<link>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-5</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Sun, 26 Oct 2008 17:40:05 +0000</pubDate>
		<guid>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-5</guid>
		<description>Hey Guy! Thank you for this script.

I've got some work to do this coming weekend with which this will make much easier.

Cheers :)</description>
		<content:encoded><![CDATA[<p>Hey Guy! Thank you for this script.</p>
<p>I&#8217;ve got some work to do this coming weekend with which this will make much easier.</p>
<p>Cheers <img src='http://davelozier.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AWstats with Vlogger Rotation by Guy Marcenac</title>
		<link>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-4</link>
		<dc:creator>Guy Marcenac</dc:creator>
		<pubDate>Sun, 26 Oct 2008 09:34:35 +0000</pubDate>
		<guid>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-4</guid>
		<description>Hello Dave,
Starting from your idea, I wrote a fully automated script creating a conf file for each of the vlogger directories and executing awstats for each site found.
I dont use the vlogger -n feature.

Here's the code:
#!/bin/sh
#
# this program will scan the logs created by vlogger,
# create an awstat configuration file for each of them
# and then execute an update of the awstats statistics
#
# it assumes that vlogger rotation is disabled (-n option)
# a good way is to rotate the logs with logrotate and run
# this program in the prerotate directive
# this shold be done if you dont want to lose any record in the rotation
#
# you can run this program as often as you need as a cron job
#
# Apache log facility setting:
# LogFormat "%v %h %l %u %t \"%r\" %&#62;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
# CustomLog "&#124; /usr/sbin/vlogger -n -s access.log -t access.log /var/log/apache2" combined
#
# This program is based on the idea from dave
# http://davelozier.com/2008/06/20/awstats-vlogger/

logdir=/var/log/apache2
confdir=/etc/awstats
datadir=/var/lib/awstats
cgidir=/cgi-bin
logfile=access.log
awCommonSetupFile=/etc/awstats/awstats.conf.local
apacheUser=www-data
apacheGroup=www-data

# check if we are the only running instance of the program
LOCK="/tmp/${0##*/}.lock"
[ -e "${LOCK}" ] &#38;&#38; exit 0
touch "${LOCK}"

# if a log directory exists in /var/log/apache and this site has no awstat conf file
# create it awstat.sitename.conf
cd $logdir
for directory in *
do
  # does the site (ServerName) directory exist and is there a matching awstats config file?
  awstatsconf="$confdir/awstats.$directory.conf"
  if [ -d ${directory} ]
  then
    if [ ! -f ${awstatsconf} ]
    then
        # create configuration file
        printf "Include \"%s\"\nLogFile=%s\nSiteDomain=%s\nDirData=%s\nDirCgi=%s\n" \
                $awCommonSetupFile \
                "$logdir/$directory/$logfile" \
                $directory \
                $datadir/$directory \
                $cgidir/$directory  &#62; $awstatsconf
        #create logging directory
        mkdir $datadir/$directory
    fi
  fi
done

# execute all updates found in $confdir
# this allow to execute manually added stats configuration files for sites not logged in the $logdir directory (smtp, ftp for instance)
cd $confdir
for conffile in awstats.*.conf
do
        # extract sitename from $conffile
        sitename=`echo $conffile &#124; awk 'BEGIN {FS="."} {i=2; while (i &#60; NF) {if (i&#60;(NF-1)) printf("%s.",$i); else printf("%s",$i); i++; }}'`
        # update stats
        /usr/lib/cgi-bin/awstats.pl -config=$sitename -update
done

#change ownership of stats data in order to allow the direct update from web interface (parameter AllowToUpdateStatsFromBrowser)
chown -R $apacheUser.$apacheGroup $datadir

#remove lockfile
rm "${LOCK}"

exit 0</description>
		<content:encoded><![CDATA[<p>Hello Dave,<br />
Starting from your idea, I wrote a fully automated script creating a conf file for each of the vlogger directories and executing awstats for each site found.<br />
I dont use the vlogger -n feature.</p>
<p>Here&#8217;s the code:<br />
#!/bin/sh<br />
#<br />
# this program will scan the logs created by vlogger,<br />
# create an awstat configuration file for each of them<br />
# and then execute an update of the awstats statistics<br />
#<br />
# it assumes that vlogger rotation is disabled (-n option)<br />
# a good way is to rotate the logs with logrotate and run<br />
# this program in the prerotate directive<br />
# this shold be done if you dont want to lose any record in the rotation<br />
#<br />
# you can run this program as often as you need as a cron job<br />
#<br />
# Apache log facility setting:<br />
# LogFormat &#8220;%v %h %l %u %t \&#8221;%r\&#8221; %&gt;s %b \&#8221;%{Referer}i\&#8221; \&#8221;%{User-Agent}i\&#8221;" combined<br />
# CustomLog &#8220;| /usr/sbin/vlogger -n -s access.log -t access.log /var/log/apache2&#8243; combined<br />
#<br />
# This program is based on the idea from dave<br />
# <a href="http://davelozier.com/2008/06/20/awstats-vlogger/" rel="nofollow">http://davelozier.com/2008/06/20/awstats-vlogger/</a></p>
<p>logdir=/var/log/apache2<br />
confdir=/etc/awstats<br />
datadir=/var/lib/awstats<br />
cgidir=/cgi-bin<br />
logfile=access.log<br />
awCommonSetupFile=/etc/awstats/awstats.conf.local<br />
apacheUser=www-data<br />
apacheGroup=www-data</p>
<p># check if we are the only running instance of the program<br />
LOCK=&#8221;/tmp/${0##*/}.lock&#8221;<br />
[ -e &#8220;${LOCK}&#8221; ] &amp;&amp; exit 0<br />
touch &#8220;${LOCK}&#8221;</p>
<p># if a log directory exists in /var/log/apache and this site has no awstat conf file<br />
# create it awstat.sitename.conf<br />
cd $logdir<br />
for directory in *<br />
do<br />
  # does the site (ServerName) directory exist and is there a matching awstats config file?<br />
  awstatsconf=&#8221;$confdir/awstats.$directory.conf&#8221;<br />
  if [ -d ${directory} ]<br />
  then<br />
    if [ ! -f ${awstatsconf} ]<br />
    then<br />
        # create configuration file<br />
        printf &#8220;Include \&#8221;%s\&#8221;\nLogFile=%s\nSiteDomain=%s\nDirData=%s\nDirCgi=%s\n&#8221; \<br />
                $awCommonSetupFile \<br />
                &#8220;$logdir/$directory/$logfile&#8221; \<br />
                $directory \<br />
                $datadir/$directory \<br />
                $cgidir/$directory  &gt; $awstatsconf<br />
        #create logging directory<br />
        mkdir $datadir/$directory<br />
    fi<br />
  fi<br />
done</p>
<p># execute all updates found in $confdir<br />
# this allow to execute manually added stats configuration files for sites not logged in the $logdir directory (smtp, ftp for instance)<br />
cd $confdir<br />
for conffile in awstats.*.conf<br />
do<br />
        # extract sitename from $conffile<br />
        sitename=`echo $conffile | awk &#8216;BEGIN {FS=&#8221;.&#8221;} {i=2; while (i &lt; NF) {if (i&lt;(NF-1)) printf(&#8221;%s.&#8221;,$i); else printf(&#8221;%s&#8221;,$i); i++; }}&#8217;`<br />
        # update stats<br />
        /usr/lib/cgi-bin/awstats.pl -config=$sitename -update<br />
done</p>
<p>#change ownership of stats data in order to allow the direct update from web interface (parameter AllowToUpdateStatsFromBrowser)<br />
chown -R $apacheUser.$apacheGroup $datadir</p>
<p>#remove lockfile<br />
rm &#8220;${LOCK}&#8221;</p>
<p>exit 0</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AWstats with Vlogger Rotation by Dave</title>
		<link>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-3</link>
		<dc:creator>Dave</dc:creator>
		<pubDate>Wed, 06 Aug 2008 00:07:17 +0000</pubDate>
		<guid>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-3</guid>
		<description>Thanks for the tip! I wasn't trying to disable it though. I just wanted the logs compressed after having them parsed with AWStats.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip! I wasn&#8217;t trying to disable it though. I just wanted the logs compressed after having them parsed with AWStats.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on AWstats with Vlogger Rotation by croolyc</title>
		<link>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-2</link>
		<dc:creator>croolyc</dc:creator>
		<pubDate>Tue, 05 Aug 2008 06:26:51 +0000</pubDate>
		<guid>http://davelozier.com/2008/06/20/awstats-vlogger/#comment-2</guid>
		<description>easy way is disable vlogger rotation
-n param</description>
		<content:encoded><![CDATA[<p>easy way is disable vlogger rotation<br />
-n param</p>
]]></content:encoded>
	</item>
</channel>
</rss>
