<?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>kwatog &#38; co.&#187; Linux</title>
	<atom:link href="http://kwatog.com/category/blog/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://kwatog.com</link>
	<description>tech notes and general nonsense</description>
	<lastBuildDate>Tue, 31 Jan 2012 06:27:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Get The First File in Unix</title>
		<link>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/</link>
		<comments>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/#comments</comments>
		<pubDate>Wed, 14 Dec 2011 07:20:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=721</guid>
		<description><![CDATA[In case you are looking files using ls or find command and only want to get the first file found, the command would be like. ls -l /any/path/filename*&#124;sed -e 's/\//,/g'&#124;awk -F "," '{print $NF}'&#124;head -1 Of course, you can also use it in find command. find /any/path/ -name "filename*" -type f&#124;sed -e 's/\//,/g'&#124;awk -F "," [...]]]></description>
			<content:encoded><![CDATA[<p>In case you are looking files using ls or find command and only want to get the first file found, the command would be like.<br />
<code><br />
ls -l /any/path/filename*|sed -e 's/\//,/g'|awk -F "," '{print $NF}'|head -1<br />
</code></p>
<p>Of course, you can also use it in find command.</p>
<p><code><br />
find /any/path/ -name "filename*" -type f|sed -e 's/\//,/g'|awk -F "," '{print $NF}'|head -1<br />
</code><br />
<span id="more-721"></span><br />
The key here is the head -1 command which limits the output to just one line. I came about this when I was investigating a problem in one of the programs that I maintain. The original code is as below.<br />
<code><br />
inputFile=`ls -l /any/path/filename*|sed -e 's/\//,/g'|awk -F "," '{print $NF}'`<br />
</code><br />
It looks correct, runs perfectly during testing and there seems to be no problem. However, if there&#8217;s more than one file, the variable inputFile will have multiple-line data. When used in a command, the problem starts. Basically, it was only expecting one file. When more than one file is push, inputFile should just get the first file. That&#8217;s why pipe-in another command which is the head -1. </p>
<p>In case you need the last file, then just change the head -1  to tail -1. </p>
<p>Bugs like this is hard to find. When we test or investigate, we usually use just one file to run through the whole program. And that&#8217;s what happened with this issue was raised to me. The previous developer is already pulling his hair because in order to get to that problematic line, he had to go trace it though a deep layer of shell scripts. </p>
<h4>Incoming search terms:</h4><ul><li>unix find first file</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-get-the-first-file-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SpotVPS First Impressions</title>
		<link>http://kwatog.com/blog/hosting/spotvps-first-impressions/</link>
		<comments>http://kwatog.com/blog/hosting/spotvps-first-impressions/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 07:57:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[NGINX]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Unix]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=706</guid>
		<description><![CDATA[After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It&#8217;s there where I stumbled upon a promo from SpotVPS. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET. And who are they? [...]]]></description>
			<content:encoded><![CDATA[<p>After the unfortunate incident last week with NordicVPS, I decided to look for a new VPS host. As usual, I went to lowendbox and get the reviews in webhostingtalk. It&#8217;s there where I stumbled upon a promo from <a href="http://www.comforthost.net/billing/aff.php?aff=115">SpotVPS</a>. As it turns out, SpotVPS is a low-cost VPS offering of ComfortHost.NET.</p>
<p>And who are they? Here&#8217;s what they say about themselves.</p>
<blockquote><p>
ComfortHost.NET have been here since 2004 offer high quality web hosting solutions. All SpotVPS nodes are fully owned hardware and are colocated. All servers used by SpotVPS have been bought with internal cash. Our only monthly cost for these servers are the actual colocation. We are financially healthy and profitable since day one. We are NOT going out of buisness any time soon. We are in it for the long run!
</p></blockquote>
<p>ComfortHost on http://www.webhostingtalk.com/showthread.php?t=1110770</p>
<p>Here&#8217;s the plan that I got.<br />
$6.99/mo Ultimate Plan<br />
Memory: 2048mb (2gb)<br />
HD Space: 50gb (50,000mb)<br />
Bandwidth: 1,000gb (1TB)<br />
Monthly Price: $6.99/mo<br />
Setup Fee: FREE!<br />
FREE GIGABIT PORT &#8211; FREE WEEKLY BACKUPS &#8211; FREE HARDWARE RAID<br />
Location: Orlando, FL at DimeNOC<br />
Test IP Address: 72.29.87.105</p>
<p>2GB RAM for $6.99. That&#8217;s sweet. Want to try it yourself? <a href="http://www.comforthost.net/billing/aff.php?aff=115">ORDER NOW</a></p>
<p>Word of caution,though. This plan (and all other dirt-cheap vps that I know of) comes with very limited support. You are usually given your VPS, IP and OS install and you have to do the rest. I installed mine with NGiNx, PHP, MySQL and it&#8217;s already up and running for 7 days straight now. </p>
<p>Here&#8217;s the result of the test I made on my VPS.<br />
<code><br />
[root@vps ~]# dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync<br />
16384+0 records in<br />
16384+0 records out<br />
1073741824 bytes (1.1 GB) copied, 14.9939 seconds, 71.6 MB/s</p>
<p>[root@vps ~]# wget cachefly.cachefly.net/100mb.test<br />
--2011-11-24 18:10:35-- http://cachefly.cachefly.net/100mb.test<br />
Resolving cachefly.cachefly.net... 205.234.175.175<br />
Connecting to cachefly.cachefly.net|205.234.175.175|:80... connected.<br />
HTTP request sent, awaiting response... 200 OK<br />
Length: 104857600 (100M) [application/octet-stream]<br />
Saving to: `100mb.test'</p>
<p>100%[==============================================================================================================================>] 104,857,600 66.8M/s in 1.5s<br />
2011-11-24 18:10:36 (66.8 MB/s) - `100mb.test' saved [104857600/104857600]<br />
</code></p>
<p>I&#8217;ll try to come up with a review together with my other hosting providers. <img src='http://kwatog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h4>Incoming search terms:</h4><ul><li>spotvps</li><li>cachefly vps</li><li>comforthost spotvps</li><li>spotvps coupon</li><li>spotvps net</li><li>vps cachefly test</li><li>vps wget 10 mb test file</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/hosting/spotvps-first-impressions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To Install Setacl in Linux</title>
		<link>http://kwatog.com/blog/how-to-install-setacl-in-linux/</link>
		<comments>http://kwatog.com/blog/how-to-install-setacl-in-linux/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 05:50:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[acl]]></category>
		<category><![CDATA[getacl]]></category>
		<category><![CDATA[getfacl]]></category>
		<category><![CDATA[setacl]]></category>
		<category><![CDATA[setfacl]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=661</guid>
		<description><![CDATA[First, there&#8217;s no setacl in Linux. Instead, it has setfacl. Take note of the f. Second, setfacl is part of the access control list(acl) package so we install the acl intead of setfacl. In that way, we also install getfacl. Here&#8217;s how. yum -y install acl Ok, that&#8217;s for CentOS and other RedHat alternatives. I [...]]]></description>
			<content:encoded><![CDATA[<p>First, there&#8217;s no setacl in Linux. Instead, it has setfacl. Take note of the f. Second, setfacl is part of the access control list(acl) package so we install the acl intead of setfacl. In that way, we also install getfacl.<br />
<span id="more-661"></span><br />
Here&#8217;s how.</p>
<p><code>yum -y install acl</code></p>
<p>Ok, that&#8217;s for CentOS and other RedHat alternatives. I believe it is <code>sudo apt-get acl</code> for Debian/Ubuntu flavors.</p>
<h4>Incoming search terms:</h4><ul><li>setacl centos</li><li>linux install setfacl</li><li>setfacl install</li><li>ubuntu setacl install</li><li>ubuntu install getfacl</li><li>ubuntu setfacl install</li><li>setacls centos</li><li>setacl in linux</li><li>which package setfacl</li><li>acl linux blog</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-install-setacl-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Upgrade MySQL 5.0 to 5.5 in CentOS</title>
		<link>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/</link>
		<comments>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/#comments</comments>
		<pubDate>Mon, 25 Jul 2011 16:19:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=651</guid>
		<description><![CDATA[I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the Pagudpud Resort&#8216;s (owned by the Jackoleros) database server, I don&#8217;t know where [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded the installed MySQL on my two VPSes about two months ago and I thought I already saved the steps somewhere or at least the saved the URL of the how to. I did not so when I tried to upgrade the <a href="http://pagudpud-resort.com">Pagudpud Resort</a>&#8216;s (owned by the Jackoleros) database server, I don&#8217;t know where to start. The MySQL official website suggests(or at least, that&#8217;s how I understand it) that I recompile. I know I did not recompile before so after some fruitless googling, I finally found a working version. But first, thanks to <a href="http://blog.famillecollet.com/pages/English-site-introduction">remi</a> for sharing the rpm.<br />
<span id="more-651"></span><br />
Before we proceed, I&#8217;d like to remind you that this is for <strong>MySQL 5.5.14</strong> on <strong>CentOS 5.6</strong>. My original MySQL install was 5.x. If your baseline environment is different from mine, then I suggest you look elsewhere for the tutorial. The source at the end of this post may help.</p>
<p>**** UPDATE *****<br />
The following steps require the EPEL (Extra Packages for Enterprise Linux) so you&#8217;ll have to install epel first before proceeding. Here&#8217;s the command:<br />
<code>rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm</code></p>
<p><strong>Step 1</strong> login as root to your vps</p>
<p><strong>Step 2</strong> Install Remi repository<br />
<code>rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-5.rpm</code><br />
The result will something like..<br />
<code>Retrieving http://rpms.famillecollet.com/enterprise/remi-release-5.rpm<br />
warning: /var/tmp/rpm-xfer.cVJJxn: Header V3 DSA signature: NOKEY, key ID 00f97f56<br />
Preparing...                ########################################### [100%]<br />
   1:remi-release           ########################################### [100%]</code></p>
<p><strong>Step 3</strong> Check availability of MySQL versions<br />
<code>yum --enablerepo=remi,remi-test list mysql mysql-server</code></p>
<p>the last lines of the output should be something like this.<br />
<code><br />
Available Packages<br />
mysql.i386                                5.5.14-1.el5.remi                          remi<br />
mysql-server.i386                         5.5.14-1.el5.remi                          remi<br />
[root@one ~]#<br />
</code></p>
<p><strong>Step 4</strong> Update or Install MySQL<br />
<code>yum --enablerepo=remi,remi-test install mysql mysql-server</strong></p>
<p><strong>Step 5</strong> Restart MySQL<br />
<code>service mysqld start</code></p>
<p><strong>Step 6</strong> Upgrade MySQL Databases<br />
<code>mysql_upgrade -u root -p</code></p>
<p>***** NOTE : THE LAST STEP IS VERY IMPORTANT BECAUSE IT WILL CREATE PRIVILEGE TABLES ******</p>
<p>Source :</p>
<p>http://www.if-not-true-then-false.com/2010/install-mysql-on-fedora-centos-red-hat-rhel/</p>
<h4>Incoming search terms:</h4><ul><li>upgrade mysql centos</li><li>update mysql centos</li><li>mysql upgrade 5 0 to 5 5</li><li>centos update mysql</li><li>upgrade mysql 5 0 to 5 5 centos</li><li>mysql 5 0 to 5 5 upgrade</li><li>centos upgrade mysql to 5 5</li><li>centos upgrade mysql</li><li>mysql upgrade centos</li><li>yum update mysql 5 5</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-upgrade-mysql-5-0-to-5-5-in-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>LAMP Install on VPS : CentOS5+Apache+MySQL+suPHP</title>
		<link>http://kwatog.com/blog/lamp-install-on-vps-centos5/</link>
		<comments>http://kwatog.com/blog/lamp-install-on-vps-centos5/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 15:50:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=627</guid>
		<description><![CDATA[Here&#8217;s the work-in-progress instructions for setting up a LAMP. It&#8217;s been sitting on my draft for ages and I have to publish it because a few of my friends need it. **** NOTE : If you notice, it&#8217;s still a draft. It came from a number of sources but these are the steps I use. [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the work-in-progress instructions for setting up a LAMP. It&#8217;s been sitting on my draft for ages and I have to publish it because a few of my friends need it. </p>
<p>**** NOTE : If you notice, it&#8217;s still a draft. It came from a number of sources but these are the steps I use. So I know it works. **********</p>
<p><span id="more-627"></span></p>
<p>update apache<br />
yum -y update </p>
<p>install utilities and compiler<br />
yum -y install zip nmap fileutils gcc-c++ acl</p>
<p>install make<br />
yum -y install make</p>
<h3>MySQL Installation</h3>
<p><code><br />
yum -y install mysql mysql-devel mysql-server<br />
chkconfig --levels 235 mysqld on<br />
mysqld start<br />
/usr/bin/mysql_secure_installation<br />
</code></p>
<h3>Install PHP</h3>
<p><code>yum -y install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc curl curl-devel perl-libwww-perl ImageMagick libxml2 libxml2-devel<br />
</code><br />
Upgrade PHP to 5.3<br />
<code>rpm -Uvh http://repo.webtatic.com/yum/centos/5/latest.rpm<br />
yum --enablerepo=webtatic update php</code></p>
<h3>Install ProFTP</h3>
<p><code>yum -y remove vsftpd   --to remov vsftpd if it's existing<br />
cd /tmp<br />
wget --passive-ftp ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.3e.tar.gz<br />
tar xvfz proftpd-1.3.3e.tar.gz<br />
cd proftpd-1.3.3e<br />
./configure --sysconfdir=/etc; make; make install<br />
cd /tmp; rm -rf ./proftpd-1.3.3*<br />
ln -s /usr/local/sbin/proftpd /usr/sbin/proftpd<br />
touch /etc/init.d/proftpd<br />
chmod 755 /etc/init.d/proftpd<br />
vi /etc/init.d/proftpd<br />
</code></p>
<p>Paste the following settings and then save.<br />
<code><br />
#!/bin/sh<br />
# $Id: proftpd.init,v 1.1 2004/02/26 17:54:30 thias Exp $<br />
#<br />
# proftpd This shell script takes care of starting and stopping<br />
# proftpd.<br />
#<br />
# chkconfig: - 80 30<br />
# description: ProFTPD is an enhanced FTP server with a focus towards \<br />
# simplicity, security, and ease of configuration. \<br />
# It features a very Apache-like configuration syntax, \<br />
# and a highly customizable server infrastructure, \<br />
# including support for multiple 'virtual' FTP servers, \<br />
# anonymous FTP, and permission-based directory visibility.<br />
# processname: proftpd<br />
# config: /etc/proftp.conf<br />
# pidfile: /var/run/proftpd.pid</p>
<p># Source function library.<br />
. /etc/rc.d/init.d/functions</p>
<p># Source networking configuration.<br />
. /etc/sysconfig/network</p>
<p># Check that networking is up.<br />
[ ${NETWORKING} = "no" ] &#038;&#038; exit 0</p>
<p>[ -x /usr/sbin/proftpd ] || exit 0</p>
<p>RETVAL=0</p>
<p>prog="proftpd"</p>
<p>start() {<br />
echo -n $"Starting $prog: "<br />
daemon proftpd<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &#038;&#038; touch /var/lock/subsys/proftpd<br />
}</p>
<p>stop() {<br />
echo -n $"Shutting down $prog: "<br />
killproc proftpd<br />
RETVAL=$?<br />
echo<br />
[ $RETVAL -eq 0 ] &#038;&#038; rm -f /var/lock/subsys/proftpd<br />
}</p>
<p># See how we were called.<br />
case "$1" in<br />
start)<br />
start<br />
;;<br />
stop)<br />
stop<br />
;;<br />
status)<br />
status proftpd<br />
RETVAL=$?<br />
;;<br />
restart)<br />
stop<br />
start<br />
;;<br />
condrestart)<br />
if [ -f /var/lock/subsys/proftpd ]; then<br />
stop<br />
start<br />
fi<br />
;;<br />
reload)<br />
echo -n $"Re-reading $prog configuration: "<br />
killproc proftpd -HUP<br />
RETVAL=$?<br />
echo<br />
;;<br />
*)<br />
echo "Usage: $prog {start|stop|restart|reload|condrestart|status}"<br />
exit 1<br />
esac</p>
<p>exit $RETVAL<br />
</code></p>
<p>vi /etc/proftpd.conf<br />
<code><br />
Group nobody<br />
DefaultRoot ~<br />
IdentLookups off<br />
ServerIdent on "FTP Server ready."<br />
</code></p>
<p>chkconfig &#8211;levels 235 proftpd on</p>
<h3>Install suPHP</h3>
<p>cd /tmp<br />
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm<br />
rpm &#8211;import http://apt.sw.be/RPM-GPG-KEY.dag.txt<br />
rpm -K rpmforge-release-0.5.2-2.el5.rf.*.rpm<br />
rpm -i rpmforge-release-0.5.2-2.el5.rf.*.rpm<br />
yum -y install htop<br />
yum -y install mod_suphp<br />
edit /etc/suphp.conf<br />
make sure these lines are there:</p>
<p>webserver_user=apache<br />
x-httpd-php=&#8221;php:/usr/bin/php-cgi&#8221;<br />
x-suphp-cgi=&#8221;execute:!self&#8221;</p>
<p> edit /etc/httpd/conf.d/suphp.conf (which is the global configuration for suPHP).<br />
vi +/suPHP_Engine /etc/httpd/conf.d/suphp.conf</p>
<p>change it to suPHP_Engine off</p>
<p>6) Set suPHP to work with VirtualHost, add these few lines inside <virtualhost> </virtualhost> tag.</p>
<p>suPHP_Engine on<br />
suPHP_UserGroup username groupname<br />
AddHandler x-httpd-php .php .php3 .php4 .php5<br />
suPHP_AddHandler x-httpd-php</p>
<p>Example :<br />
<VirtualHost 75.235.323.55:80><br />
    ServerAdmin support@yourdomain.com<br />
    DocumentRoot /usr/kitty/yourdomain.com<br />
    ServerName yourdomain.com<br />
    ServerAlias *.yourdomain.com<br />
    suPHP_Engine on<br />
    suPHP_UserGroup kitty kitty<br />
    AddHandler x-httpd-php .php .php3 .php4 .php5<br />
    suPHP_AddHandler x-httpd-php<br />
    ErrorLog logs/yourdomain.com-error_log<br />
    CustomLog logs/yourdomain.com-access_log common<br />
</VirtualHost></p>
<p>Source : <a href="http://wiki.centos.org/AdditionalResources/Repositories/RPMForge" rel="nofollow">CentOS Additional Packages</a></p>
<h4>Incoming search terms:</h4><ul><li>centos 5 lamp install</li><li>stop suphp</li><li>suphp configuration centos apache</li><li>suphp lamp</li><li>touch /var/lock/subsys/proftpd</li><li>vps centos how to instyall php version 5</li><li>yum -y mysql</li><li>yum install php3</li><li>yum upgrade apache centos</li><li>php sql vps cent os</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/lamp-install-on-vps-centos5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recursive setacl command on Linux/Unix</title>
		<link>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/</link>
		<comments>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/#comments</comments>
		<pubDate>Fri, 24 Jun 2011 09:45:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[recursive]]></category>
		<category><![CDATA[setacl]]></category>
		<category><![CDATA[unix]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=591</guid>
		<description><![CDATA[Setting access control list(acl) recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below. find /any/path -exec setacl -m user:USERID:rwx {} ';' What it does is it finds all the files and directories inside the /any/path, recursively. [...]]]></description>
			<content:encoded><![CDATA[<p>Setting <strong>access control list(acl) </strong>recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below.<br />
<span id="more-591"></span><br />
<code><br />
find /any/path -exec setacl -m user:USERID:rwx {} ';'<br />
</code></p>
<p>What it does is it finds all the files and directories inside the /any/path, recursively. And then on each of the files/directories, it executes the the setacl command. </p>
<p>For some linux flavors, this is done simpler as below.<br />
<code><br />
setacl -Rm user:USERID:rwx<br />
</code></p>
<p>Here&#8217;s how to install setacl/setfacl &#8211;><a href="http://kwatog.com/blog/how-to-install-setacl-in-linux/">Install setacl</a></p>
<h4>Incoming search terms:</h4><ul><li>setacl linux</li><li>linux install command recursive</li><li>setacl recursive</li><li>SetACL</li><li>kwatog setfacl</li><li>setacl recursive in hp-ux</li><li>setacl kwatog</li><li>setacl hp-ux file</li><li>setacl en linux que es?</li><li>setacl command in unix</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/recursive-setacl-command-on-linuxunix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SubVersion Initialization Error</title>
		<link>http://kwatog.com/blog/subversion-initialization-error/</link>
		<comments>http://kwatog.com/blog/subversion-initialization-error/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 08:00:37 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=577</guid>
		<description><![CDATA[After installing subversion, I hit some error when I tried to restart Apache. When I removed/renamed the subversion.conf and the error went away. Obviously, subversion did not work. So I investigated to find out the root cause. Here&#8217;s two of the errors I encountered. Cannot load /etc/httpd/modules/mod_dav_svn.so Invalid command &#8216;AuthUserFile&#8217; Solution Uncomment the following lines [...]]]></description>
			<content:encoded><![CDATA[<p>After installing subversion, I hit some error when I tried to restart Apache. When I removed/renamed the subversion.conf and the error went away. Obviously, subversion did not work. So I investigated to find out the root cause.<br />
<span id="more-577"></span><br />
Here&#8217;s two of the errors I encountered.</p>
<ol>
<li><strong>Cannot load /etc/httpd/modules/mod_dav_svn.so</strong></li>
<li><strong>Invalid command &#8216;AuthUserFile&#8217;</strong></li>
</ol>
<h3>Solution</h3>
<p>Uncomment the following lines in httpd.conf<br />
<code><br />
LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so<br />
</code></p>
<p>It turned out that I commented these files to limit the number of modules loaded on Apache. I&#8217;m only loading the bare minimum so that WordPress would run properly on my VPS.</p>
]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/subversion-initialization-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Install Subversion on CentOS</title>
		<link>http://kwatog.com/blog/how-to-install-subversion-on-centos/</link>
		<comments>http://kwatog.com/blog/how-to-install-subversion-on-centos/#comments</comments>
		<pubDate>Sun, 12 Jun 2011 20:00:12 +0000</pubDate>
		<dc:creator>kwatog</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[setup]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=570</guid>
		<description><![CDATA[I finally decided to setup an online version control and chose subversion (instead of cvs which I use on my macbook). Initially, I was thinking of subscribing to github but the prospect of paying monthly did not bode well especially that it would only be me who will be updating the codes. Github has a [...]]]></description>
			<content:encoded><![CDATA[<p>I finally decided to setup an online version control and chose subversion (instead of cvs which I use on my macbook). Initially, I was thinking of subscribing to github but the prospect of paying monthly did not bode well especially that it would only be me who will be updating the codes. Github has a free service though. But that&#8217;s if you open-source your code.<br />
<span id="more-570"></span><br />
Ok, enough for the chatter. Here&#8217;s the steps for installing subversion.</p>
<p><strong>Step 1: Install SubVersion via yum</strong><br />
<code>yum install mod_dav_svn subversion</code></p>
<p><strong>Step 2: Edit Apache Config</strong><br />
<code>vi /etc/httpd/conf/httpd.conf</code></p>
<p>make sure to uncomment the following lines.<br />
<strong>LoadModule authn_file_module modules/mod_authn_file.so<br />
LoadModule dav_module modules/mod_dav.so<br />
</strong></p>
<p><strong>Step 3: Restart Apache</strong><br />
<code>service httpd start</code></p>
<p><strong>Step 4: Edit subversion.conf</strong><br />
<code><br />
cd /etc/httpd/conf.d/<br />
vi subversion.conf<br />
</code><br />
make sure the modules below are also uncommented<br />
LoadModule dav_svn_module     modules/mod_dav_svn.so<br />
LoadModule authz_svn_module   modules/mod_authz_svn.so</p>
<p>Add the following to allow a basic authentication and point Apache to where the actual repository resides.<br />
<code><br />
&lt;Location /repos&gt;<br />
   DAV svn<br />
   SVNParentPath /var/www/svn/repos</p>
<p>   # Limit write permission to list of valid users.<br />
   &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
      # Require SSL connection for password protection.<br />
      # SSLRequireSSL</p>
<p>      AuthType Basic<br />
      AuthName "Authorization Realm"<br />
      AuthUserFile /etc/svn-auth-conf<br />
      Require valid-user<br />
   &lt;/LimitExcept&gt;<br />
&lt;/Location&gt;<br />
</code></p>
<p><strong>VPS ALERT!!!!</strong><br />
Since I&#8217;m using Virtual Private Server (VPS) and suPHP, I have the code below. Take note that the location is inside the VirtualHost directive.<br />
<code><br />
&lt;VirtualHost *:80&gt;<br />
    ServerAdmin support@domain.com<br />
    DocumentRoot /var/www/domain.com<br />
    ServerName domain.com<br />
    ServerAlias *.domain.com<br />
    suPHP_Engine on<br />
    suPHP_UserGroup myuser myuser<br />
    AddHandler x-httpd-php .php .php3 .php4 .php5<br />
    suPHP_AddHandler x-httpd-php<br />
    ErrorLog logs/domain.com-error_log<br />
    LogFormat "%h %l %u %t \"%r\" %>s %b" common<br />
    CustomLog logs/domain.com-access_log common<br />
    &lt;Location /repos&gt;<br />
      DAV svn<br />
      SVNParentPath /var/www/domain.com/repos      SetHandler repos</p>
<p>     &lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
      AuthType Basic<br />
      AuthName &quot;Authorization Realm&quot;<br />
      AuthUserFile /etc/svn-auth-conf<br />
      Require valid-user<br />
    &lt;/LimitExcept&gt;</p>
<p>&lt;/Location>&gt;<br />
&lt;/VirtualHost&gt;<br />
</code><br />
<strong>Step 5: Set the Password for your Users</strong><br />
<code><br />
[root@vps ~]# htpasswd -cm /etc/svn-auth-conf yourusername<br />
New password:<br />
Re-type new password:<br />
Adding password for user yourusername<br />
[root@vps ~]# htpasswd -m /etc/svn-auth-conf anotherusername<br />
New password:<br />
Re-type new password:<br />
Adding password for user anotherusername<br />
</code></p>
<p><strong>Step 6: Create Your Repository</strong><br />
<code><br />
[root@vps ~]# cd /var/www/ -- Or wherever you placed your path above<br />
[root@vps ~]# mkdir svn<br />
[root@vps ~]# cd svn<br />
[root@vps ~]# svnadmin create repos<br />
[root@vps ~]# chown -R apache:apache repos<br />
[root@vps ~]# service httpd restart<br />
</code></p>
<hr/>
Source : http://wiki.centos.org/HowTos/Subversion</p>
<h4>Incoming search terms:</h4><ul><li>install subversion centos</li><li>centos svn</li><li>install subversion on centos</li><li>install svn centos</li><li>svnauthz conf httpd conf</li><li>svn centos passwd</li><li>install subversion on centos step by step</li><li>mod dav svn sethandler php</li><li>password protect svn centos</li><li>step by step guide to install subversion in centos</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/how-to-install-subversion-on-centos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Read Input Without Echo in Bash</title>
		<link>http://kwatog.com/blog/read-input-without-echo-in-bash/</link>
		<comments>http://kwatog.com/blog/read-input-without-echo-in-bash/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 07:23:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=555</guid>
		<description><![CDATA[I have a script that needs to be deployed in different environment as most scripts are. This script requires asking for userid, tnsname and password during deployment. I tried to use READ but it echoes the password on the screen as soon as I type it. So how can we hide the password? Here&#8217;s how. [...]]]></description>
			<content:encoded><![CDATA[<p>I have a script that needs to be deployed in different environment as most scripts are. This script requires asking for userid, tnsname and password during deployment. I tried to use READ but it echoes the password on the screen as soon as I type it. So how can we hide the password? Here&#8217;s how.<br />
<span id="more-555"></span><br />
<code><br />
echo "TNSNAME         : \c"<br />
read  TNSNAME</p>
<p>echo "Enter User Name :  \c"<br />
read  DBUSER</p>
<p>echo "Enter Password  :  \c"<br />
#hear is the meat<br />
stty -echo<br />
read  DBPASS<br />
stty echo<br />
echo "" #new line</p>
<p>echo $DBUSER"/"$DBPASS"@"$TNSNAME<br />
</code></p>
<p>As you see, I used <em>stty -echo</em> before the <em>read DBPASS</em>. It suppresses the displaying of what you type so that no one can see the password. I added the <em>stty echo</em> to put the display back after getting the password.</p>
<p>Depending on the Unix/Linux flavor you are using, the script above may or may not work. So you can try the one below. It is much simpler but did not work for HP UX.<br />
<code><br />
read -s  "TNSNAME         : " TNSNAME<br />
read -s  "Enter User Name : " DBUSER<br />
read -sp "Enter Password  : " DBPASS<br />
<code></p>
<p>Neat and straightforward. Unfortunately, it work mostly for Linux. Hats of to peterbe(http://www.peterbe.com/plog/passwords-with-bash) where I got this.</p>
<p>By the way, did you notice the <strong>\c</strong> on my echo commands? That's to suppress the linefeed/newline character so that you'll input the values next to the prompt. </p>
<h4>Incoming search terms:</h4><ul><li>bash read password no echo</li><li>bash read password</li><li>bash read input</li><li>bash read no echo</li><li>read a password in bash without showing it</li><li>bash readInput</li><li>read contraseñas bash</li><li>C no echo input</li><li>echo $ % bash</li><li>echo -e bash</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/read-input-without-echo-in-bash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Fail To Start After Upgrade to 5.1 or higher</title>
		<link>http://kwatog.com/blog/mysql-fail-to-start-after-upgrade-to-5-1/</link>
		<comments>http://kwatog.com/blog/mysql-fail-to-start-after-upgrade-to-5-1/#comments</comments>
		<pubDate>Sun, 15 May 2011 01:37:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<guid isPermaLink="false">http://kwatog.com/?p=535</guid>
		<description><![CDATA[I recently upgraded my MySQL in preparation for WordPress 3.2. The version I now have is 5.5.12. The upgrade finished without a hitch but when I tried to restart the service, the MySQL Daemon failed. Here&#8217;s the log of mysql (/var/log/mysqld.log) 110514 14:04:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 110514 14:04:22 [Note] Plugin [...]]]></description>
			<content:encoded><![CDATA[<p>I recently upgraded my MySQL in preparation for WordPress 3.2. The version I now have is 5.5.12. The upgrade finished without a hitch but when I tried to restart the service, the MySQL Daemon failed. </p>
<p>Here&#8217;s the log of mysql (/var/log/mysqld.log)<br />
<code><br />
110514 14:04:22 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql<br />
110514 14:04:22 [Note] Plugin 'InnoDB' is disabled.<br />
110514 14:04:22 [Note] Plugin 'FEDERATED' is disabled.<br />
/usr/libexec/mysqld: Table 'mysql.plugin' doesn't exist<br />
110514 14:04:22 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.<br />
110514 14:04:22 [ERROR] Unknown/unsupported storage engine: InnoDB<br />
110514 14:04:22 [ERROR] Aborting<br />
</code></p>
<p>Initially, I thought the problem was on the mysql_upgrade part because that&#8217;s the first error that appears on the log. Apparently, that&#8217;s just a warning message because the service still managed to proceed to the next step which is for the InnoDB. And based on the log, it failed to start and actually aborted. So that&#8217;s where I should concentrate my investigation/trial-and-error.</p>
<h3>Solution</h3>
<p>I opened /etc/my.cnf and comment out skip-innodb and then restart mysqld. It fixed the problem and mysql managed to start. I then proceeded with the mysql_upgrade which is unrelated to the error.</p>
<p>Another solution for this is to set the default storage to other than InnoDB. However, I haven&#8217;t tried that myself.</p>
<h4>Incoming search terms:</h4><ul><li>mysql daemon failed to start</li><li>mysql daemon failed to start centos</li><li>mysql failed to start</li><li>Unknown/unsupported storage engine: InnoDB</li><li>mysql upgrade failed</li><li>unknown/unsupported storage engine: innodb centos</li><li>mysql daemon failed to start after update</li><li>mysql upgrade 5 1 to 5 5 mysql daemon failed to start</li><li>mysql start failed log</li><li>mysql restart failed</li></ul>]]></content:encoded>
			<wfw:commentRss>http://kwatog.com/blog/mysql-fail-to-start-after-upgrade-to-5-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
<!--
Hyper cache file: fe6ac70e10aad265d9c0f8749e650867
Cache created: 04-02-2012 09:18:59
HCE Version: 0.9.8
Load AVG: 0.06(5)
-->
