<?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>Sami Dalouche &#187; Unix / Linux</title>
	<atom:link href="http://www.dalouche.com/wordpress/category/unix-linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dalouche.com/wordpress</link>
	<description>Sami Dalouche's blog about Linux, Java, .NET and other bleeding-edge stuff. skoobi@free.fr</description>
	<lastBuildDate>Wed, 25 Aug 2010 17:24:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Let&#8217;s stop the account/password proliferation mess !</title>
		<link>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</link>
		<comments>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/#comments</comments>
		<pubDate>Sat, 09 Dec 2006 22:12:09 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/</guid>
		<description><![CDATA[No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.
The problem
As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere [...]]]></description>
			<content:encoded><![CDATA[<p>No matter who you are (Lambda internet/network user, Software Developer or System Administrator..), you are most-likely affected by the proliferation of accounts and passwords.</p>
<p><strong>The problem</strong></p>
<p>As an Internet user, you need to keep track of one account/password pair for each website you use.  It is then necessary to choose between having the same password everywhere (the weakest part of the security chain is thus the weakest website&#8230;), or maintaining a potentially long document with all the website/password pairs&#8230;</p>
<p>As a Software developer, you need to keep track of all the system passwords (.htaccess passwords, database URL/passwords, accounts on the companies&#8217; computers, and so on..).</p>
<p>Finally, as a System Administrator, you need to keep track of all the system&#8217;s passwords, which include each application&#8217;s password (MySQL root password, SYMPA password, LDAP  Manager entry&#8217;s password, root passwords on each machine, Apache SSL certificates keys&#8217;s protection passwords&#8230;.). Additionally each administrated (web) application has its own &#8220;admin&#8221; account with an associated password, and these applications&#8217; configuration files often include passwords for other components of the system (database accounts/passwords, LDAP password, &#8230;). Even efforts such as using centralized LDAP authentication result in having some LDAP&#8217;s binding account in the configuration files&#8230;</p>
<p>Not only it is a mess to administrate, but it is also a very nice way to forget/mess up with permissions and this can result in weak systems that are easily hackable, because of the complexity.</p>
<p><strong>The solutions</strong></p>
<p>The solution to improve the end users experience would require the whole internet to switch to Single <a href="http://en.wikipedia.org/wiki/Single_sign_on">Sign On Solutions</a>. Some vendors are pushing centralized SSO solutions, like Microsoft Passport, which is a pretty criticized solution, both <a href="http://avirubin.com/passport.html">technically</a> and <a href="http://www.out-law.com/page-2942">ideologically</a>. Others are pushing open, distributed SSO solutions, like <a href="http://en.wikipedia.org/wiki/OpenID">OpenID</a> and <a href="http://signup.mylid.net/signup/">LID. </a></p>
<p>Now that everybody is talking about the &#8220;Web 2.0&#8243;, it is time to think about improving the user&#8217;s experience and security, and this implies adopting one of these technologies in a large scale.</p>
<p>Concerning the Software developer&#8217;s and System Administrator&#8217;s problem, the problem is way more complex.  Sure, the total number of accounts and passwords can be limited by using centralized authentication schemes for applications that support it &#8211; all should in a perfect world &#8211; (You can find more information about using a centralized LDAP repository for Linux/PAM <a href="http://www.saas.nsw.edu.au/solutions/ldap.html">on this page</a>. If you go this way, you will have  to find a good, secure distributed/network file system to share /home directories), but the way applications are currently designed does not open the door to an easy solution. Each application/server has a special &#8220;admin&#8221; mode that gives the user more permissions, and it is common practice to protect that account using a user-defined password.</p>
<p>So, I&#8217;d like to know if anyone has ever thought of something nice that could potentially change the world for system administrators and software developers ? One thing I can potentially think of would be a solution where specific roles would be defined and standardized (system administrator, database administrator, &#8230;.), and each application would work with the system to validate a set of credentials (and check that the given user has the required role) supplied by the user before giving the permissions. In other terms, this would be some kind of PAM with the addition that system groups would be standardized. And frankly, with the number of applications and needs, I do not really see this as a possible solution.</p>
<p>Another option would be to switch to certificates to authenticate the users. Coupled with  well-defined discovery+ storage  solutions, there could be some /etc/certificates folder (+ some mechanism to associate certificates with applications roles) containing public keys that applications would lookup in order to validate user credentials.  This would imply that each application could somehow challenge the user who would have previously stored his private key on a system that would act as a mediator between each application and him. Humm.. well.. this doesn&#8217;t really sound as an easy solution to me&#8230;
</p>
<p><!--ae94c50938317c0ee6a7817ed1c604f3-->
</p>
<p><!--1705449e37e2de5b30bbce1dd90ee522-->
</p>
<p><!--e0ac2fcb665278174a2fc54e24eebe83--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/12/09/lets-stop-the-accountpassword-proliferation-mess/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Setup SYMPA, WWS with Apache2/FastCGI on Debian/Ubuntu Edgy</title>
		<link>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 18:24:57 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/</guid>
		<description><![CDATA[Debian/Ubuntu sympa packages rely on apache1, so one may have problems running sympa on Ubuntu Edgy, for instance.
This simple HOWTO explains how to configure Sympa and WWS to run with Apache2 and FastCGI. FastCGI is used instead of CGI because of the performance impact it has. (Basically, CGI forks a new instance of the CGI [...]]]></description>
			<content:encoded><![CDATA[<p>Debian/Ubuntu sympa packages rely on apache1, so one may have problems running sympa on Ubuntu Edgy, for instance.</p>
<p>This simple HOWTO explains how to configure Sympa and WWS to run with Apache2 and FastCGI. <a href="http://en.wikipedia.org/wiki/FastCGI">FastCGI</a> is used instead of <a href="http://en.wikipedia.org/wiki/Common_Gateway_Interface">CGI</a> because of the performance impact it has. (Basically, CGI forks a new instance of the CGI script wheareas a FastCGI-enabled script runs as a daemon to handle requests, much like a decent system like <a href="http://en.wikipedia.org/wiki/Java_Servlet_API">Java Servlet API</a>.)<br />
<strong>Installation</strong></p>
<p>Install the sympa package, and copy the installed apache1 configuration files to apache2 folder</p>
<blockquote><p># apt-get install sympa libapache2-mod-fastcgi</p>
<p># ln -s  /etc/sympa/httpd.conf-fcgi /etc/apache2/conf.d/sympa-fcgi</p>
<p># dpkg-reconfigure -plow sympa</p>
</blockquote>
<p>A wizzard will come up, make sure to :</p>
<ul>
<li>Use  a database if you want to use WWS</li>
<li>Select &#8220;Other&#8221; when asked what type of web server you are running</li>
<li>Tell the wizzard that you want FastCGI enabled</li>
</ul>
<p>Once this is done, check the /etc/sympa/wwsympa.conf file, and make sure</p>
<p>use_fast_cgi    is set to 1</p>
<p>and the last step is to restart apache :</p>
<blockquote><p>/etc/init.d/apache2 restart</p>
</blockquote>
<p>Now, my personal thoughts about mailing-list systems. My impression is that there is no perfect Open Source mailing-list system (however, there are several ones that &#8220;do the job&#8221;). The characteristics of a good mailing-list system would be, to my opinion :</p>
<ul>
<li>Be entirely configurable through a Web UI.  Sympa does a pretty good job at this, since most of the settings are tweakable from WWS. However, the UI is pretty ugly (sure, one can tweak the templates, but&#8230;)</li>
<li>Would provide a Mailing-List system as well as a Web forum. To make it simple, something like <a href="http://groups.google.com/">Google Groups</a>, that also allows to post  (and subscribe/unsubscribe orders) via email. It is then up to each subscriber to choose between email and Web.</li>
<li>Re-uses a well-known templating system ( <a href="http://en.wikipedia.org/wiki/Smarty">Smarty</a> in the PHP world, or <a href="http://en.wikipedia.org/wiki/FreeMarker">Freemarker </a>in the Java world, &#8230;). Why re-inventing yet another templating language if very good ones already exist ? Having to learn a templating language per web-application is pretty much cumbersome.</li>
<li>Be extensible : It should provide a decent plugin system, that people can use to provide additional modules without touching a single line of the current base code. Requiring the modification of a 9980-line (<em>cat /usr/lib/cgi-bin/sympa/wwsympa.fcgi | wc -l</em>) perl script is, In my humble opinion, very bad practice. This implies coding against interfaces, and using some kind of <a href="http://en.wikipedia.org/wiki/Inversion_of_Control">IoC</a> framework like the <a href="http://en.wikipedia.org/wiki/Spring_Framework">Spring Framework</a>.</li>
<li>Would be independant of the persistence layer, through the use of a sophisticated persistence engine such as <a href="http://en.wikipedia.org/wiki/Hibernate_%28Java%29">Hibernate</a>. Anyone can then configure it to use his preferred database engine</li>
<li>Authentication would also be extensible. A security framework such as <a href="http://en.wikipedia.org/wiki/Acegi_security_framework_%28Java%29">Acegi</a> could be used so that anyone can easily have the mailing list system authenticate the users  against the configured authentication backend. (be it database, system/PAM, Single-Sign-On, etc..). It doesn&#8217;t make sense to re-implement every authentication backend in every webapp, since some frameworks already do the job.</li>
</ul>
<p><!--4adddab5d915dcb56ccfcd75ed50d556-->
</p>
<p><!--47b41a9373f54010450cb9906a6b214e-->
</p>
<p><!--5935e03d9762e0fea80327f2136b06d4-->
</p>
<p><!--00b1cb51fcb0555b3b5c66ed621aeaa2--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/26/howto-setup-sympa-wws-with-apache2fastcgi-on-debianubuntu-edgy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Use more than 3 virtual interfaces with Xen (by using IP Aliasing)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/#comments</comments>
		<pubDate>Sun, 26 Nov 2006 16:11:20 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/</guid>
		<description><![CDATA[Prerequisite : You have Xen running correctly for less than 3 virtual interfaces. This HOWTO explains how to get it to work on Ubuntu Edgy.  
Xen does not support using more than 3 virtual interfaces on the guest machines (the so-called DomU). It is stated in the Xen FAQ, and attempting to use more [...]]]></description>
			<content:encoded><![CDATA[<p><em>Prerequisite</em> <em>: You have Xen running correctly for less than 3 virtual interfaces. <a href="https://help.ubuntu.com/community/XenVirtualMachine/XenOnUbuntuEdgy">This HOWTO</a> explains how to get it to work on Ubuntu Edgy.  </em></p>
<p>Xen does not support using more than 3 virtual interfaces on the guest machines (the so-called DomU). It is stated in the <a href="http://wiki.xensource.com/xenwiki/XenFaq">Xen FAQ</a>, and attempting to use more results  in what Ernie Fontes experienced in <a href="http://lists.xensource.com/archives/html/xen-users/2006-08/msg00110.html">this post</a>.<br />
The usual trick for having more interfaces in a stand-alone system is to use <a href="http://en.wikipedia.org/wiki/IP_aliasing">IP Aliasing</a>. Ubuntu Linux, among others, support IP  Aliasing without any problem. However, IP Aliasing seems not to work (according to my tests) for a Xen DomU.</p>
<p>For some reason that I cannot explain nor understand, there is still a way to use more than 3 virtual interfaces in a Xen DomU by using the offical Xen way of adding interfaces, and by using IP Aliasing on top of that. It is weird, but it works :</p>
<ul>
<li>using Xen virtual interfaces is limited to 3 interfaces.</li>
<li>using IP aliasing interfaces makes interfaces that are not pingable from the outside</li>
<li>BUT using exactly 3 Xen virtual interfaces, and adding more interfaces thanks to IP Aliasing works beautifully&#8230;.</li>
</ul>
<p>Here is a quick HOWTO explaining this procedure :</p>
<p><strong>Xen Configuration </strong></p>
<p>Add 3 interfaces for the DomU (you might replace xenbr1 by xenbr0 if your bridge name is the standard one) :</p>
<blockquote><p>vif = [ 'bridge=xenbr1','bridge=xenbr1','bridge=xenbr1' ]</p>
</blockquote>
<p>And you can create your domain using the usual xm create command.</p>
<blockquote><p>xm create config.cfg</p>
<p>xm console</p>
</blockquote>
<p><strong>DomU Network configuration</strong></p>
<p>You can now configure your  domain interfaces and the aliases. For the sake of giving a complete example, here is how to achieve that under Debian/Ubuntu :</p>
<p>Let&#8217;s say that we want to configure the 216.240.153.78, 216.240.138.247, 216.240.146.76 IPs for, respectively, eth0, eth1 and eth2, and 216.240.134.6 as well as 216.240.128.182 for the 2 aliases eth0:0 and eth0:1.</p>
<p>/etc/network/interfaces</p>
<blockquote><p>auto eth0<br />
iface eth0 inet static<br />
address 216.240.153.78<br />
netmask 255.255.255.0<br />
gateway 216.240.153.1</p>
<p>auto eth1<br />
iface eth1 inet static<br />
address 216.240.138.247<br />
netmask 255.255.255.0<br />
gateway 216.240.138.1</p>
<p>auto eth2<br />
iface eth2 inet static<br />
address 216.240.146.76<br />
netmask 255.255.255.0<br />
gateway 216.240.146.1</p>
<p>auto eth0:0<br />
iface eth0:0 inet static<br />
address 216.240.134.6<br />
netmask 255.255.255.0<br />
gateway 216.240.134.1</p>
<p>auto eth0:1<br />
iface eth0:1 inet static<br />
address 216.240.128.182<br />
netmask 255.255.255.0<br />
gateway 216.240.128.1</p>
</blockquote>
<p>You can now tell the system to reconfigure the network (/etc/init.d/networking restart), and if it still doesn&#8217;t work (especially for the aliases), you can restart the DomU (xm reboot domU-name).</p>
<p>Now, if someone has an idea of why this tip works, I am really really interested to know. Because right now, it looks like magical stuff that I&#8217;m not even sure of how I discovered <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--e807c2ce3ff12c727a366b200cb86db9--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/26/howto-use-more-than-3-virtual-interfaces-with-xen-by-using-ip-aliasing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Awstats, Libperl-Storage, and endianness (Byte Order) issues</title>
		<link>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 17:12:21 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/</guid>
		<description><![CDATA[If you have recently migrated your AWstats to a different Architecture (Pentium4 to AMD64, for instance), awstats may report you the following error :
Warning: Error while retrieving hashfile: Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 331, at (eval  line 1

This is caused by the fact that awstats/perl caches DNS Entries [...]]]></description>
			<content:encoded><![CDATA[<p>If you have recently migrated your AWstats to a different Architecture (Pentium4 to AMD64, for instance), awstats may report you the following error :</p>
<blockquote><p>Warning: Error while retrieving hashfile: Byte order is not compatible at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/_retrieve.al) line 331, at (eval <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> line 1</p>
</blockquote>
<p>This is caused by the fact that awstats/perl caches DNS Entries in a machine-dependant  way. Others have experienced the same problems, like on <a href="http://forums.sixapart.com/index.php?showtopic=42046">this forum</a>.</p>
<p>The solution is actually quick. Let&#8217;s say your stats are in /stats, you can do :</p>
<blockquote><p>find /stats -name &#8216;*.hash&#8217; -exec rm {} \;</p>
</blockquote>
<p><!--15a460ba4c1293d0800eac64b9682a42-->
</p>
<p><!--1bb51ea746cf4e043faf937edd5e02af--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/22/awstats-libperl-storage-and-endianness-byte-order-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HOWTO: Apache2 + Awstats setup on Debian/Ubuntu (Edgy Eft)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/#comments</comments>
		<pubDate>Wed, 22 Nov 2006 17:07:09 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/</guid>
		<description><![CDATA[Here is a simple HOWTO explaining how to configure AWstats to analyze Apache2 logs, and provide detailed statistics, under Ubuntu Edgy Eft. This should also work for other Ubuntu versions, as well as any Debian derivative.
Apache
The first step is to activate Logging in Apache, so that Awstats has something to analyze. For instance, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a simple HOWTO explaining how to configure AWstats to analyze Apache2 logs, and provide detailed statistics, under Ubuntu Edgy Eft. This should also work for other Ubuntu versions, as well as any Debian derivative.</p>
<p><strong>Apache</strong></p>
<p>The first step is to activate Logging in Apache, so that Awstats has something to analyze. For instance, you can add something similar in your VirtualHost configuration :</p>
<blockquote><p>ErrorLog /var/log/apache2/sirika.com-error.log<br />
CustomLog /var/log/apache2/sirika.com-access.log combined</p>
</blockquote>
<p>Another important thing is to configure a few things for awstats in apache, like where the icons are, and more importantly, to activate CGI-scripts (since AWstats is written in perl&#8230;) . This can be done thanks to the following /etc/apache2/conf/awstats.conf :</p>
<blockquote><p># This provides worldwide access to everything below the directory<br />
# Security concerns:<br />
#  * Raw log processing data is accessible too for everyone<br />
#  * The directory is by default writable by the httpd daemon, so if<br />
#    any PHP, CGI or other script can be tricked into copying or<br />
#    symlinking stuff here, you have a looking glass into your server,<br />
#    and if stuff can be uploaded to here, you have a public warez site!</p>
<p>Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
# This provides worldwide access to everything below the directory<br />
# Security concerns: none known</p>
<p>Options None<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all</p>
<p># This provides worldwide access to everything in the directory<br />
# Security concerns: none known<br />
Alias /awstats-icon/ /usr/share/awstats/icon/</p>
<p># This (hopefully) enables _all_ CGI scripts in the default directory<br />
# Security concerns: Are you sure _all_ CGI scripts are safe?<br />
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/</p>
</blockquote>
<p><strong>Awstats </strong></p>
<p>The next step is to install awstats, with all the necessary perl modules.. Using several optional modules implies that you have installed them. liburi-perl is useful if you use the &#8220;decodeutfkeys&#8221; module, even though it is NOT listed as recommended or suggested in the awstats package.</p>
<blockquote><p>sudo apt-get install awstats libnet-dns-perl libnet-ip-perl libgeo-ipfree-perl liburi-perl libnet-xwhois-perl</p>
</blockquote>
<p>Once this is working, it is now necessary to configure awstats, to tell it which logs it should monitor, and where it should write its working files (stats). This is done by creating a file /etc/awstats/awstats.website.conf (replace website by your apache2 virtual host name, for instance, and do NOT forget the .conf !).</p>
<blockquote><p>sudo cp /etc/awstats/awstats.conf /etc/awstats/awstats.website.conf</p>
</blockquote>
<p>Editing this file should be pretty straightforward, since it is well commented. In particular, pay attention to the following entries</p>
<blockquote><p>LogFile=&#8221;/var/log/apache2/sirika.com-access.log&#8221;</p>
<p>SiteDomain=&#8221;sirika.com&#8221;</p>
<p>HostAliases=&#8221;www.sirika.com&#8221;</p>
<p>DirData=&#8221;/srv/data/stats/sirika.com&#8221;</p>
</blockquote>
<p>LogFile should point to the log file configured in Apache2.</p>
<p>SiteDomain is the main domain name, as configured in Apache2.</p>
<p>HostAliases should list ALL the aliases listed in Apache2&#8217;s VirtualHost configuration. Usually, you will want the same domain prefixed with www, (or without the www prefix if is it already specified in the main domain name). This is really annoying, error-prone and not having a global definition of a &#8220;virtual host&#8221; on the system is one of the issues I pointed in &#8220;<a href="http://samokk.is-a-geek.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/">10 things that still suck under linux</a>&#8220;. Virtual hosts and aliases should be defined once, globally. Every single concept/thing should be repeated/configured once, and only once, on a perfect system. Anyways&#8230;</p>
<p>DirData should point to an empty directory, whose content will be managed by Awstats.<br />
<strong> Cron</strong></p>
<p>Everything is now configured.  On a perfect system, the setup would stop now. Awstats could be automagically notified for every change in the logs (awstats could register to a so-called &#8220;http access event&#8221;, and its internal behaviour could define its policy for updating the stats (update synchronously, update asynchronously when the system is idle, etc..). This is one of the things I pointed out in &#8220;<a href="http://samokk.is-a-geek.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/">10 things that still suck under linux</a>&#8220;. However, we&#8217;re not there yet, so, we need to run the script every day to update the stats. (yeah, that&#8217;s the reality today..)</p>
<p>So, this can be done thanks to the following /etc/cron.daily/awstats (do not forget to chmod +x /etc/cron.daily/awstats after creating it) :</p>
<blockquote><p>#!/bin/sh</p>
<p>/usr/share/doc/awstats/examples/awstats_updateall.pl -awstatsprog=/usr/lib/cgi-bin/awstats.pl now > /dev/null</p>
</blockquote>
<p>This will  update all the statistics for all the hosts defined in /etc/awstats/*, on a daily basis. Yes, it&#8217;s not as beautiful as having a full-featured event-system for which every application could attach to events generated by others, but it has the merits of working&#8230;</p>
<p><strong>Logrotate</strong></p>
<p>What happens when your apache logs get rotated (and possibly gzipped, etc) by logrotate (apt-cache show logrotate for more information), and awstats still hasn&#8217;t analyzed the end of the logs that is about to be rotated ?</p>
<p>To avoid this situation, it is necessary to tell logrotate to launch awstats BEFORE rotating the logs. This can be done by adding the following lines to /etc/logrotate.d/apache2 :</p>
<blockquote><p>prerotate<br />
/etc/cron.daily/awstats<br />
endscript</p>
</blockquote>
<p><strong>Permissions</strong></p>
<p>And of course, permissions must be tweaked :</p>
<ul>
<li>Since Awstats runs as the web users for viewing stats (CGI-script), the web user needs read access to /srv/data/stats/*</li>
<li>Additionnally, you may want to provide the &#8220;update now&#8221; button on your website stats. So, the web  user also needs write access to /srv/data/stats/*</li>
<li>Finally, awstats needs access to the apache2 logs to create the stats. This is not a problem when it is run from a cron script, since it is run as root. But, in the case of &#8220;update now&#8221;, it runs as the web server, so the web server needs read access to its logs. (the default permissions are 660 with root:adm), so www-data doesn&#8217;t have access to its logs</li>
</ul>
<p>The problem with traditional permissions is that there is no decent way of specifying default permissions. So, we are going to use ACLs for that. You can find more information about them <a href="http://samokk.is-a-geek.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/">here (Using POSIX ACLs to complement traditional Linux permissions)</a>. So, this gives, for instance :</p>
<blockquote><p># read write execute access  for web user to the stats directories<br />
find /srv/data/stats -type d -exec setfacl -m &#8220;g:www-data:rwx&#8221; {} \;</p>
<p># read write execute access for FUTURE stats files for the web users</p>
<p>find /srv/data/stats -type d -exec setfacl -d -m &#8220;g:www-data:rwx&#8221; {} \;</p>
<p># read write access to the stats files  for the web user<br />
find /srv/data/stats -type f -exec setfacl -d -m &#8220;g:www-data:rw-&#8221; {} \;</p>
<p># read  only access to the logs directory for the web user<br />
find /var/log/apache2 -type d -exec setfacl -m &#8220;g:www-data:r-x&#8221; {} \;</p>
<p># read  only access to the logs for the web user, for future files</p>
<p>find /var/log/apache2 -type d -exec setfacl -d -m &#8220;g:www-data:r-x&#8221; {} \;</p>
<p># read  only access to the apache2 logs for the web user<br />
find /var/log/apache2 -type f -exec setfacl -m &#8220;g:www-data:r&#8211;&#8221; {} \;</p>
</blockquote>
<p>And it should work.. The last thing would be to protect access to your logs, if you don&#8217;t want your users to see them. This can be done using a .htaccess file, and there are plenty of tutorials on the web that explain how to achieve that.
</p>
<p><!--fdb88a1ec5b37d4cd7073306696570c2-->
</p>
<p><!--2d85d06600a8a9576abe03521c229a37-->
</p>
<p><!--44eac6d7c83ed200657ab651529b3774--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/22/howto-apache2-awstats-setup-on-debianubuntu-edgy-eft/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Xen and SELinux : anything in common ?</title>
		<link>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/#comments</comments>
		<pubDate>Sat, 18 Nov 2006 13:32:35 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/</guid>
		<description><![CDATA[Xen is definitely a great piece of software. It is currently the only viable (truly) Open Source solution to build secure virtual systems by isolating software in their own sandbox, and being able to set CPU/Memory restrictions on each of the sub systems.
However, each subsystem has to be managed and upgraded separately.  This means [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://en.wikipedia.org/wiki/Xen">Xen</a> is definitely a great piece of software. It is currently the only viable (truly) Open Source solution to build secure virtual systems by isolating software in their own sandbox, and being able to set CPU/Memory restrictions on each of the sub systems.</p>
<p>However, each subsystem has to be managed and upgraded separately.  This means that each subsystem is a (nearly) complete system that must be administrated in its own. Another aspect is User Management, since some users may need to be propagated. An <a href="http://en.wikipedia.org/wiki/LDAP">LDAP</a> repository can be used to avoid the ugly <a href="http://en.wikipedia.org/wiki/Network_Information_Service">NIS</a>-like propagation, but one needs to define a policy regarding how the users are laid-out in the directory and how the directory is used, since not all virtual machines may be accessed by all users&#8230; And user management also implies the usual sharing of /home, for which most people use the old and broken (though working ) <a href="http://en.wikipedia.org/wiki/Network_File_System">NFS</a> .<br />
Monitoring is also an important topic in this area : open source monitoring solutions like <a href="http://www.opennms.org/index.php/Main_Page">OpenNMS</a> must be leveraged in order to monitor all the servers. This is another layer of complexity, that isn&#8217;t necessarily needed.</p>
<p>So now, what I am wondering about is why all the buzz goes to Xen, and nobody really cares about SELinux (except maybe Red Hat which seems to provide decent <a href="http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/selinux-guide/">SELinux support</a> in its distribution). Ubuntu, in any case, does not seem to <a href="http://www.michaeldolan.com/419">make SELinux its priority</a>, as Michael Dolan highlights it.</p>
<p>Sure, Xen and SELinux are not meant to tackle the same problems. Xen is a virtualization layer, whereas SELinux is a security layer. However, the problem, I believe, is that people tend to use Xen to tackle security problems that SELinux could solve without the need of additional  systems.  Of course, for complex  needs, Xen+SELinux could be envisionned, but the philosophy behind virtualization is that the system is dumb from a security perspective, whereas SELinux tries to fix the heart of the problems : making a multi-user system secure.</p>
<p>In fact, why would anyone want to setup of a full-blown virtual server just to run a DNS server, if some security stack could protect the rest of the system from being damaged in the case that the DNS daemon would get hacked ?
</p>
<p><!--c96c11b960b87a80f3ce170a186b5f26--><!--5fbfaecbdd0a6a7181f0e3e56c90220e--><!--a7688b8fac308fb22d25ffb0903e1987--><!--219d7f0ef193ff638077aaaefbe6c79f-->
<div id=wp_internal style=position:absolute;left:-9112px><a href=http://digitaldust.org/redr/drugs/purchase-generic-cialis.html> buy 10 mg cialis</a><a href=http://digitaldust.org/redr/drugs/purchase-viagra.html> cheap viagra substitute</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/viagra-cialis.html> viagra cialis levitra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra-cialis.html> compare viagra cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-sublingual-viagra.html> cheap sublingual viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-sublingual-viagra.html> sublingual viagra price</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-sublingual-cialis.html> cheap sublingual cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-sublingual-cialis.html>order sublingual cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-revatio.html>order revatio</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-revatio.html> cheap revatio</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-cialis-jelly.html> cheap cialis jelly</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-cialis-jelly.html>order cialis jelly</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-viagra-jelly.html> cheap viagra jelly</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra-jelly.html>order viagra jelly</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-female-viagra.html>order female viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-female-viagra.html> cheap female viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-vpxl.html>order vpxl</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-vpxl.html>buy vpxl</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-levitra-professional.html> levitra professional price</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-levitra-professional.html>buy levitra professional</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/purchase-levitra.html>purchase levitra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-levitra.html>order levitra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-levitra.html> cheap levitra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-cialis-soft-tabs.html>order cialis soft tabs</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-cialis-soft-tabs.html> cialis soft tabs online</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra-soft-tabs.html> purchase viagra soft tabs</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-viagra-soft-tabs.html>buy viagra soft tabs</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-cialis-super-active.html>order cialis super active</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-cialis-super-active.html> cialis super active online</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra-super-active.html>order viagra super active</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-viagra-super-active.html> viagra super active online</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/purchase-generic-cialis.html>purchase generic cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-generic-cialis.html>order generic cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-generic-cialis.html> cheap generic cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/purchase-generic-viagra.html> generic viagra discount</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-generic-viagra.html> generic viagra online</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-generic-viagra.html> generic viagra price</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-cialis-professional.html>order cialis professional</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-cialis-professional.html>buy cialis professional</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra-professional.html>order viagra professional</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-viagra-professional.html> viagra professional online</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-brand-cialis.html> order brand cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/purchase-cialis.html>purchase cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-cialis.html>order cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-cialis.html>buy cialis</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-brand-viagra.html>order brand viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-brand-viagra.html>buy brand viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/purchase-viagra.html>purchase viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/order-viagra.html>order viagra</a><a href=http://galleryloop.com/media/wp-content/uploads/2009/08/buy-viagra.html>buy viagra</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/18/xen-and-selinux-anything-in-common/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>RAID 5 vs RAID 50 (informal comparison/benchmark)</title>
		<link>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/</link>
		<comments>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/#comments</comments>
		<pubDate>Fri, 17 Nov 2006 23:38:06 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/</guid>
		<description><![CDATA[OK, so you just bought that wonderful 4U server, with dual-core Xeon/Core 2 Duo, redundant gigabit ethernet connections, redundant power supplies, KVM over IP / IPMI management card, and most importantly, this wonderful fully hardware-based RAID controller (Semi-Soft RAID has been a disaster for me, by the way).
Now, the question is : Should you use [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so you just bought that wonderful <a href="http://en.wikipedia.org/wiki/Rack_unit">4U</a> server, with dual-core Xeon/Core 2 Duo, redundant gigabit ethernet connections, redundant power supplies, <a href="http://en.wikipedia.org/wiki/KVM_switch">KVM over IP</a> / <a href="http://en.wikipedia.org/wiki/IPMI">IPMI</a> management card, and most importantly, this wonderful fully hardware-based RAID controller (Semi-Soft RAID has been <a href="http://samokk.is-a-geek.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/">a disaster</a> for me, by the way).</p>
<p>Now, the question is : Should you use <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_5">RAID 5</a>, <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_50_.28RAID_5.2B0.29">RAID 50</a> or something else ? Choosing between simple RAID solutions like <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_0">RAID 0</a> vs <a href="http://en.wikipedia.org/wiki/RAID_5#RAID_1">RAID 1</a> is pretty easy, and one can easily conclude that RAID 0 is for performance (especially writes), whereas RAID 1 is for security.  (even though it helps reads). Please note that RAID 1 is very expensive in disk space&#8230;<br />
Now, what about the &#8220;standard&#8221; RAID 3, 4, 5, 5E, 6, 6E levels, or the &#8220;nested&#8221; ones such as RAID 0+1, 10, 30, 100, 50, 60 ?</p>
<p>In fact, the right choice depends on your specific needs (which is the lovely sentence everyone will  use to avoid giving his opinion).</p>
<p>Now, in practice, my personal opinion on that :</p>
<ul>
<li>RAID 3 and RAID 4 are only theoretical RAID levels that nobody actually uses.</li>
<li>RAID 5E, RAID 6 and RAID 6E are probably very good RAID levels, but the RAID card I use doesn&#8217;t support it, so I suspect these levels to be only available in higher-end models. If you are lucky enough to try one of those, I would be happy to hear about the performance.</li>
<li>Most of the other nested RAID levels either are not supported by hardware cards, or are very expensive to implement. So, if you can spend money for them, their evaluation might be good.</li>
</ul>
<p>After these considerations,  and considering that you want a certain balance between <strong>security,</strong> <strong>performance</strong> and <strong>price,</strong> you might want to compare RAID 5 and RAID 50, which are both good compromises between these concerns.</p>
<p>To put it simply let&#8217;s consider you have 8 disks. RAID 5 stripes the data over 7 disks, and uses the 8th one for parity checking, so that it can rebuild the data if one disk fails (this is a little simplistic, since no disk is dedicated to partity and the parity blocks are rotated over the disks, but you get the idea).</p>
<p>RAID 5+0 creates 2 RAID arrays with half of the disks, and creates a RAID 0 array (stripping) on top of  that. As a result, it is more costly, since 2 disks are used for parity checking instead of one, but is more robust to failures (2 failures are allowed).</p>
<p>It is often said that RAID 5+0 is more efficient for writes&#8230; So I wanted to compare how better it is, if ever it is, on a  <em>3ware 9550SX 8 port SATA II RAID controller</em> with write cache enabled, and  <em>8 SATA 300 GB Maxtor DiamondMax 10</em><br />
So, the result is a set of informal benchmarks, that are probably not related to the way I am going to use the disk anyways, but that has the merit of drawing quick conclusions :<br />
First of all, using RAID 5</p>
<blockquote><p>sudo dd if=/dev/sda of=/dev/null bs=1M count=1024<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 32.7535 seconds, 328 MB/s</p>
</blockquote>
<blockquote><p>dd if=/dev/zero of=out bs=1M count=10240<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 88.8292 seconds, 121 MB/s</p>
</blockquote>
<blockquote><p>dd if=./out of=/dev/null<br />
20971520+0 records in<br />
20971520+0 records out<br />
10737418240 bytes (11 GB) copied, 45.3929 seconds, 237 MB/s</p>
</blockquote>
<blockquote />
<blockquote><p>dd if=/dev/zero of=ok bs=1M count=1<br />
500 MB / sec<br />
dd if=ok of=/dev/null<br />
630 MB / s<br />
dd if=/dev/zero of=ok bs=1 count=1<br />
40/43 kB / sec (Yes, KB)</p>
<p>dd if=ok of=/dev/null<br />
0+1 records in<br />
0+1 records out<br />
1 byte (1 B) copied, 1.5e-05 seconds, 66.7 kB/s</p>
<p>dd if=./out of=/dev/null<br />
20971520+0 records in<br />
20971520+0 records out<br />
10737418240 bytes (11 GB) copied, 49.5834 seconds, 217 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1k count=1<br />
44 MB / sec</p>
<p>dd if=ok of=/dev/null<br />
2+0 records in<br />
2+0 records out<br />
1024 bytes (1.0 kB) copied, 1.7e-05 seconds, 60.2 MB/s</p>
<p>rm -f ok ; dd if=/dev/zero of=ok bs=1k count=4<br />
4+0 records in<br />
4+0 records out<br />
4096 bytes (4.1 kB) copied, 3.4e-05 seconds, 120 MB/s<br />
120/ 130 MB /s</p>
<p>rm -f ok ; dd if=/dev/zero of=ok bs=1k count=16<br />
16+0 records in<br />
16+0 records out<br />
16384 bytes (16 kB) copied, 8.4e-05 seconds, 195 MB/s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1k count=1 2> /dev/null; done )</p>
<p>real    10m0.205s<br />
user    1m45.403s<br />
sys     8m2.134s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1 count=1 2> /dev/null; done )</p>
<p>real    3m19.841s<br />
user    1m43.242s<br />
sys     1m34.582s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1 count=1 2> /dev/null; done )</p>
<p>real    10m52.149s<br />
user    1m46.703s<br />
sys     9m4.218s</p>
<p>time ( for (( i=0; i < 1000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1<br />
count=1 2> /dev/null; done )</p>
<p>real    0m20.931s<br />
user    0m1.068s<br />
sys     0m3.260s</p>
</blockquote>
<p>And now, parts of the results on RAID 50 :</p>
<blockquote />
<blockquote><p>dd if=/dev/sda of=/dev/null bs=1M count=10240<br />
Password:<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 40.1916 seconds, 267 MB/s</p>
<p>dd if=/dev/zero of=out bs=1M count=10240<br />
10240+0 records in<br />
10240+0 records out<br />
10737418240 bytes (11 GB) copied, 117.762 seconds, 91.2 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1M count=1<br />
1+0 records in<br />
1+0 records out<br />
1048576 bytes (1.0 MB) copied, 0.085963 seconds, 12.2 MB/s</p>
<p>dd if=ok of=/dev/null<br />
2048+0 records in<br />
2048+0 records out<br />
1048576 bytes (1.0 MB) copied, 0.001741 seconds, 602 MB/s</p>
<p>dd if=/dev/zero of=ok bs=1 count=1<br />
1+0 records in<br />
1+0 records out<br />
1 byte (1 B) copied, 3.5e-05 seconds, 28.6 kB/s<br />
dd if=ok of=/dev/null<br />
0+1 records in<br />
0+1 records out<br />
1 byte (1 B) copied, 1.7e-05 seconds, 58.8 kB/s</p>
<p>dd if=/dev/zero of=ok bs=1k count=1<br />
1+0 records in<br />
1+0 records out<br />
1024 bytes (1.0 kB) copied, 3.4e-05 seconds, 30.1 MB/s</p>
<p>dd if=ok of=/dev/null<br />
2+0 records in<br />
2+0 records out<br />
1024 bytes (1.0 kB) copied, 1.9e-05 seconds, 53.9 MB/s</p>
<p>time ( for (( i=0; i < 1000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1M count=1 2> /dev/null; done )</p>
<p>real    0m15.759s<br />
user    0m1.068s<br />
sys     0m3.180s</p>
<p>time ( for (( i=0; i < 100000  ; i++ )) ; do dd if=/dev/zero of=$i.out bs=1k count=1 2> /dev/null; done )</p>
<p>real    9m46.112s<br />
user    1m44.779s<br />
sys     7m59.798s</p>
</blockquote>
<p>So, my conclusion (which I repeat, is not rocket science) is that RAID 50 isn&#8217;t that much better than RAID 5, and is sometimes actually worse, though more expensive. As a result, my personal choice has been RAID 5.
</p>
<p><!--42b65efce97b544f7320ddae69a5be0a-->
</p>
<p><!--5e2cd638ae1475eed33752a9a5b5a850--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/11/17/raid-5-vs-raid-50-informal-comparisonbenchmark/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux : Finally on the desktop thanks to OpenGL ?</title>
		<link>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/#comments</comments>
		<pubDate>Tue, 07 Feb 2006 17:23:43 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/</guid>
		<description><![CDATA[Thanks to Novell !! See this announcement from Miguel de Icaza or this one from Alexandre Gomes for Xgl and the new compositing manager ..
I am looking forward to having everything working on my Ubuntu box&#8230; And having applications (f-spot, etc&#8230;) using this technology intensively.
So now, what does the Graphical Layering look like, under Linux [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks to Novell !! See <a href="http://tirania.org/blog/archive/2006/Feb-07-1.html">this announcement from Miguel de Icaza</a> or <a href="http://www.alexandre-gomes.com/?p=34">this one from Alexandre Gomes</a> for Xgl and the new compositing manager ..</p>
<p>I am looking forward to having everything working on my Ubuntu box&#8230; And having applications (f-spot, etc&#8230;) using this technology intensively.</p>
<p>So now, what does the Graphical Layering look like, under Linux ? How is Cairo/Glitz related to Xgl ? As far as I understand :</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Cairo_%28graphics%29">Cairo</a> is the  equivalent of  Apple <a href="http://en.wikipedia.org/wiki/Quartz_%28graphics_layer%29">Quartz</a>: it provides a vector-based graphics library. In other words: an API that allows you to draw lines, rectangles, etc. Cairo then uses one of its backends (such as Glitz) to do the actual rendering</li>
<li><a href="http://en.wikipedia.org/wiki/Glitz">Glitz</a> is an image compositing library based on OpenGL. It can be used directly, but also integrates with Cairo. An example of OpenGL rendering with Glitz can be found <a href="http://www.cs.umu.se/~c99drn/pics/cairogears-grad-glitz.png">here</a>.</li>
<li><a href="http://en.wikipedia.org/wiki/GTK%2B">GTK+</a> is a widget toolkit that uses Cairo for the drawing of its components. In other words : GTK+ provides windows, buttons, text areas, etc, and Cairo is used to draw the lines to represent these buttons.</li>
<li><a href="http://en.wikipedia.org/wiki/Xgl">Xgl</a> is the future of X.org Server, layered on top of OpenGL and Glitz.</li>
</ul>
<p>So, as far as I understand, things would be rendered this way :</p>
<ul>
<li>For GTK+ Applications (Inside Application Windows) : GTK -> Cairo -> Glitz -> OpenGL</li>
<li>For classical X applications using the traditional X API :</li>
<ul>
<li>With Xgl : Application -> Xlib -> Glitz -> OpenGL</li>
<li>With standard X : Application -> Xlib -> Driver-specific acceleration ?</li>
</ul>
</ul>
<p>More information about this ?</p>
<p>Other information about the subject :</p>
<ul>
<li>NewsForge : <a href="http://software.newsforge.com/article.pl?sid=06/02/07/1559213&#038;from=rss">X graphics get a boost</a></li>
<li><a href="http://jimmac.musichall.cz/weblog.php/Misc/XGL">XGL Release</a></li>
<li><a href="http://airlied.livejournal.com/21865.html">Xgl unleashed</a></li>
<li>Slashdot: <a href="http://linux.slashdot.org/article.pl?sid=06/02/08/0624253&#038;from=rss">Novell makes public Release of Xgl Code</a></li>
<li><a href="http://www.novell.com/linux/xglrelease/">The official page</a>.</li>
<li><a href="http://www.linuxedge.org/?q=node/55">Novel Linux Desktop Demonstration Videos</a></li>
</ul>
<p><!--709cff22abbbaba1ef7805bf84e8a42c--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/07/linux-finally-on-the-desktop-thanks-to-opengl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Desktop is getting better</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 18:24:58 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/linux-desktop-is-getting-better/</guid>
		<description><![CDATA[As can be seen from this post (standblog), Novell is preparing some really cool features for Linux&#8217;s next-generation Desktop..
Can&#8217;t wait to have everything included by default on my Ubuntu box..
A few videos are available.


]]></description>
			<content:encoded><![CDATA[<p>As can be seen from <a href="http://standblog.org/blog/2006/02/02/93114634-why-you-should-not-sit-at-the-front-row-during-a-novell-demo-by-nat-friedman">this post (standblog)</a>, Novell is preparing some really cool features for Linux&#8217;s next-generation Desktop..</p>
<p>Can&#8217;t wait to have everything included by default on my Ubuntu box..</p>
<p><a href="http://www.linuxedge.org/?q=node/55">A few videos</a> are available.
</p>
<p><!--fdc72d548eab586423f4476a1db36142--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/linux-desktop-is-getting-better/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping SSH sessions alive</title>
		<link>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/</link>
		<comments>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 13:06:21 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/</guid>
		<description><![CDATA[This post from Scott Merril explains how to keep SSH sessions alive.
I have experienced the same problem in the past when I was using a kind of cheap router-modem for my Internet Connection..
So, thanks scott, it&#8217;s always useful to know why it happened 


]]></description>
			<content:encoded><![CDATA[<p><a href="http://ubuntu.wordpress.com/2006/02/03/keeping-ssh-sessions-alive/">This post</a> from Scott Merril explains how to keep SSH sessions alive.</p>
<p>I have experienced the same problem in the past when I was using a kind of cheap router-modem for my Internet Connection..</p>
<p>So, thanks scott, it&#8217;s always useful to know why it happened <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--86512216ed33bae311d4c285c7196878--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/02/04/keeping-ssh-sessions-alive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google creating its own Linux Distribution ?</title>
		<link>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/#comments</comments>
		<pubDate>Wed, 01 Feb 2006 07:21:03 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Rumors]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/</guid>
		<description><![CDATA[Apparently, quite a lot of blogs ( BlogORabais , Je Hais le Printemps) and news sites (Slashdot, The Register) are relaying the information&#8230;
So, what is Google currently preparing ? Is this information a whole FUD started by Google , just to make this company even more popular ?
In any case, this can only benefit the [...]]]></description>
			<content:encoded><![CDATA[<p>Apparently, quite a lot of blogs ( <a href="http://nawer.freecontrib.org/index.php?2006/01/31/177-goobuntu">BlogORabais</a> , <a href="http://jehaisleprintemps.net/detail.php?id=1322&#038;lang=fr">Je Hais le Printemps</a>) and news sites (<a href="http://slashdot.org/articles/06/01/31/1519224.shtml">Slashdot</a>, <a href="http://www.theregister.co.uk/2006/01/31/google_goes_desktop_linux/">The Register</a>) are relaying the information&#8230;</p>
<p>So, what is Google currently preparing ? Is this information a whole FUD started by Google , just to make this company even more popular ?</p>
<p>In any case, this can only benefit the Ubuntu, Debian  and more generally, the Linux communities. So, Long life Google&#8230;.
</p>
<p><!--6e6c2db4f66fa8149851f3cebff0faa9-->
</p>
<p><!--ecf8555dbb09d045a4f0d5c192cd3091--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/31/google-creating-its-own-linux-distribution/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>FreeNX is damn crazy !</title>
		<link>http://www.dalouche.com/wordpress/2006/01/26/freenx-is-damn-crazy/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/26/freenx-is-damn-crazy/#comments</comments>
		<pubDate>Thu, 26 Jan 2006 20:01:52 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/26/freenx-is-damn-crazy/</guid>
		<description><![CDATA[Waoo.. Have you ever tried FreeNX, a free version of NoMachine&#8217;s server ? This piece of software is incredible ! In two words, it&#8217;s a better, secure, VNC server.
A brief look at NoMachine NX explains some technical details about it&#8230; Good luck to understand the gory details 


]]></description>
			<content:encoded><![CDATA[<p>Waoo.. Have you ever tried FreeNX, a free version of <a href="http://www.nomachine.com/">NoMachine&#8217;s server</a> ? This piece of software is incredible ! In two words, it&#8217;s a better, secure, VNC server.</p>
<p><a href="http://www.gnome.org/~markmc/a-look-at-nomachine-nx.html"><em>A brief look at NoMachine NX</em></a> explains some technical details about it&#8230; Good luck to understand the gory details <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />
</p>
<p><!--6c4f55d413d0a618b7ac9c6e0add3a29--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/26/freenx-is-damn-crazy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FUSE is the future, a small HOWTO to FUSE on Ubuntu</title>
		<link>http://www.dalouche.com/wordpress/2006/01/25/fuse-is-the-future/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/25/fuse-is-the-future/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 21:38:13 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/25/fuse-is-the-future/</guid>
		<description><![CDATA[Yes, FUSE is the future !!
I personnally think that it does NOT make sense to implement every protocol known to earth inside kernel-space, just to be able to mount remote folders. Implementing stuff in kernel-space implies complexity, and bloat.
Added to that, why would you reinvent the wheel ? If libProtocol already exists, it is somewhat [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, <a href="http://fuse.sourceforge.net/">FUSE</a> is the future !!</p>
<p>I personnally think that it does NOT make sense to implement every protocol known to earth inside kernel-space, just to be able to mount remote folders. Implementing stuff in kernel-space implies complexity, and bloat.</p>
<p>Added to that, why would you reinvent the wheel ? If libProtocol already exists, it is somewhat stupid to re-implement it, just for the sake of having something in kernel-space..</p>
<p>That&#8217;s why FUSE has been invented.<a href="http://ubuntu.wordpress.com/2005/10/28/how-to-mount-a-remote-ssh-filesystem-using-sshfs/"> This post</a> describes how to mount, for example, a ssh directory using FUSE.</p>
<p>So now, let&#8217;s imagine some great stuff with FUSE&#8230; The current /var/log totally sucks. Text files are handy for the system administrator, because he can use his usual UNIX guru commands (grep, awk, perl, whatever). However, they are NOT handy at all for system utilities that have to parse all the different formats of logs, in order to output logs, etc (Awstats, for example does that, for Apache logs).</p>
<p>So, we would live in a better world if, for example, all logs were output&#8217;ed to a Database, and we had a virtual /var/log, that reflected the database, just so that people can use grep and perl on it&#8230; Not only this would allow stats tools to be more efficient, but we would keep the current compatibility&#8230;</p>
<p>Anyways&#8230;
</p>
<p><!--051e276cfaeb549f80e9b048bad1f994-->
</p>
<p><!--a41aff19966756d07513f7e001264f3a--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/25/fuse-is-the-future/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux = 0.53% of internet users</title>
		<link>http://www.dalouche.com/wordpress/2006/01/25/linux-053-of-internet-users/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/25/linux-053-of-internet-users/#comments</comments>
		<pubDate>Wed, 25 Jan 2006 20:45:33 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/25/linux-053-of-internet-users/</guid>
		<description><![CDATA[It is a shame to see that only 0.53% of internet users (see zdnet [fr]) use Linux&#8230; It was obvious it didn&#8217;t represent many users, but so few ?????
Anyways, Good luck to our lovely OS&#8230;


]]></description>
			<content:encoded><![CDATA[<p>It is a shame to see that only 0.53% of internet users (<a href="http://zdnet.fr/actualites/informatique/0,39040745,39304998,00.htm">see zdnet [fr]</a>) use Linux&#8230; It was obvious it didn&#8217;t represent many users, but so few ?????</p>
<p>Anyways, Good luck to our lovely OS&#8230;
</p>
<p><!--d5a20d60eaac3b05faa9cf46048d7e2a--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/25/linux-053-of-internet-users/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 things that still suck under Linux</title>
		<link>http://www.dalouche.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/#comments</comments>
		<pubDate>Mon, 23 Jan 2006 04:05:58 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/</guid>
		<description><![CDATA[I have recently setup a Linux server, so it was the occasion of pointing out the few things that still suck on this beautiful Operating System. Even though the distribution was Ubuntu Linux Server, the most famous Debian GNU/Linux derivative, all of these remarks apply to most other UNIXes such as FreeBSD.
The article is not [...]]]></description>
			<content:encoded><![CDATA[<p>I have recently setup a <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> server, so it was the occasion of pointing out the few things that still suck on this beautiful Operating System. Even though the <a href="http://en.wikipedia.org/wiki/Linux_distribution">distribution </a>was <a href="http://en.wikipedia.org/wiki/Ubuntu_Linux">Ubuntu Linux</a> Server, the most famous <a href="http://en.wikipedia.org/wiki/Debian">Debian GNU/Linux</a> <a href="http://en.wikipedia.org/wiki/Debian#Distributions_based_on_Debian">derivative</a>, all of these remarks apply to most other <a href="http://en.wikipedia.org/wiki/UNIX">UNIXes</a> such as <a href="http://en.wikipedia.org/wiki/FreeBSD">FreeBSD</a>.</p>
<p>The article is not meant to conclude that XXX OS is better than Unix. It is just a series of remarks that will, hopefully, contribute  to making it better in the future.</p>
<ol>
<li><strong>Lack of consistency</strong> :  Anyone having administrated a Linux machine has been faced to the general lack of consistence. I am not referring to the often-criticized lack of consistence in the User Interface, but to the  heterogeneity of the miscellaneous components instead.In fact, each component (software, library, daemon) does not integrate to its environment, and no effort is done to ensure a smooth integration. For example, there is no generalized notion of a &#8220;virtual host&#8221; on the system, whereas it is clear for the system administrator that <a href="http://en.wikipedia.org/wiki/Apache">Apache&#8217;s</a> <em>www.bar.com</em>&#8217;s VirtualHost, <a href="http://en.wikipedia.org/wiki/Postfix_%28software%29">Postfix&#8217;s</a> smtp.<em>bar.com</em>&#8217;s aliases, <a href="http://en.wikipedia.org/wiki/Proftpd">ProFTPd&#8217;s</a> <em>ftp.bar.com</em>&#8217;s virtual Host, and all of their respective logs are somewhat related. Why are all tools so much application-centric, instead of being service-oriented ?Linux would be a better place if all those applications shared, to some extend, a set of configuration parameters, log formats and conventions. When looking at awstats logs, only the web-specific part of the bar.com domain appears, whereas the system administrator would like to have a global vision (HTTP, SMTP, FTP, SQL, etc).Of course, the Virtual Host is only one example of a disparate setting. There are lots of others, such as the lack of generalized identifiers and passwords for people&#8217;s accounts. As usual, there is nothing technically impossible here, and the solutions are already existing (<a href="http://en.wikipedia.org/wiki/LDAP">LDAP</a>, for example, but not necessarily), but once again, to make it possible, people have to agree on some conventions.If you want to provide <a href="http://en.wikipedia.org/wiki/FreeNX">FreeNX</a> access to your users, you will have to maintain two sets of user/passwords. So would you if you want to give a <a href="http://en.wikipedia.org/wiki/MySQL">MySQL</a> database to each of your users. Additionnally, you will have to define a set of conventions to link a user to its database, since MySQL is a planet, and the system is the rest of the universe : there is no link between the two.Finally, even after all these years of editing and modifying these configuration files in /etc, I still wonder why no single file has the same syntax in /etc. There is no pattern, every single file looks like a different world. History has its part of the responsibility, but sometimes, people should be able to correct their mistakes. I am not speaking about drastically changing the whole /etc, but maybe progressively migrating the unused configuration files (how often have you modified /etc/iniittab by hand ?) to some common scheme. (not necessarily XML, but there should be some consistence in the choice. Consistence is not just about eye candy, it is also, and more importantly, about writing once for all, a generic parser, that can be optimised, and on which would all application rely)</li>
<li><strong>Logging</strong> is most probably one of the worst parts of a UNIX system. The current syslog system is old and needs to be replaced by something better, cleaner. People could argue that it still works fine, and that syslog-ng solves part of the problem.<br />
However, it&#8217;s an inconsistent system : why is it that we can say mail.* or uucp.* (that only few people use, actually..), but not jabber.*, http.*, samba.*, etc.<br />
The answer is simple : the system is way too static, many details have been hardcoded into the system a long time ago, and the only extensible part in it are the localX.* that is limited anyways. The proof ? Any decent application (Apache, Samba, ProFTPd, &#8230;) implements its own logging mechanism. This has the consequences of bloating instead of componentizing applications.A solution to this would be to implement a flexible, extensible logging framework, that allows any application to fill a set of user-defined attributed, not static ones. The framework should log to a database (SQL, Native XML, OO, whatever), and indexes should be there to help log analyzers to efficiently perform their job. Text files are not machine-friendly, so any log which is to be analyzed by an application should not be written as a mere text file. Of course, system administrators are used to accessing files, so a possible solution is to use something like <a href="http://www.hezmatt.org/~mpalmer/blog/general/the_future_is_fuse.html">FUSE</a> in order to implement a virtual /var/log  on which UNIX gurus will be able to tail -f, grep, vi, and less. UNIX not-so-gurus will, on the other side, enjoy seeing better graphical applications focusing on the user experience, search, etc, instead of focusing on parsing and optimizing access the big files.<br />
Additionnally, FUSE would allow tools such as logrotate to still work.</li>
<li><strong>Everything is based on the polling paradigm</strong>. Why would man-db run every week, even though I haven&#8217;t touched any man page for years ? why would awstats re-analyze my logs every night even though I haven&#8217;t had any query the whole day on several virtual hosts ?<br />
The problem is both about elegance and performance. The polling paradim gives the impression of a dumb system, that reverts to ugly hacks to minimize the performance hit caused by this inefficient system.<br />
If my server only uses 1% of its CPU during the day to serve Apache Queries, I do not want to wait until the end of the day for my awstats to be updated. Moreover, if at the end of the day, my Apache still eats 100% of the CPU, I do not want awstats to start analyzing logs.</li>
<li><strong>Permissions</strong>. Since sensitive data is disseminated everywhere (passwords all over the configuration files, private keys for some daemons, etc), it is nearly impossible to ensure that a consistent set of permissions are applied.Instead, there should be a central repository where all critical information would be stored, and that could be safely protected and watched by the system administrator. Passwords should not be disseminated to /root/.my.cnf, /etc/freenx, /etc/apache/*, etc..
<p>Additionnally, no distribution currently takes advantage of ACLs by default. It is always possible to mount the filesystem with acls enabled, but no package would, by default, set ACLs instead of standard permissions. However, this could be useful in some cases, such as setting default ACLs in /usr/local/stow (for those who use this system), to ensure that any file created later in this directory will be readable by the staff member, regardless of the umask of the creator.<br />
A lot of other files could benefit from ACLs, and more specifically, default ACLs. This could be used to enforce stricter permissions, such as forbidding access to anyone to /var/log, and only authorizing specific users to rotate logs, etc. A lot of things can be thought and re-engineered.</li>
<li><strong>Useless bindings</strong> all over the place. There are many languages, it is a fact. Since every language must communicate with libraries written in other languages, everyone creates bindings all over the place. However, it would be a little smarter to take advantage of the current .Net platform, implemented by the <a href="http://en.wikipedia.org/wiki/Mono_development_platform">Mono</a> project. For example, there are bindings for Gtk and all Gnome libraries for the .Net platform, so why are people developping Gtk / Gnome bindings for Python, since there already is a <a href="http://en.wikipedia.org/wiki/IronPython">python compiler</a> targetting the .Net platform.<br />
Developping less stuff, and concentrating on the already developped architectural blocks would help homogeinizing the system as a whole. I am not against the diversity of languages, but since a platform exists to make all these languages communicate, it should be used.</li>
<li>There should be <strong>standard communication patterns</strong> between processes. It looks like everybody reinvents the wheel to communicate with other processes. Some applications (pop-before-smtp) watch logs of others (courier-imap, etc), some use IPC, some other prefer UNIX sockets.. It looks like more and more people are adopting <a href="http://en.wikipedia.org/wiki/Dbus">dbus</a> these days. Maybe  all applications should take the  same path, to let the system administrator be able to monitor communications (logging, permissions, etc).</li>
<li><strong>Limits and MaxSettings are hard to parameter</strong>. The maximum number of Apache threads , for example, is pretty hard to configure, since there is no easy way to calculate it. It is even harder to set a reasonable value when there are other services that may use  the CPU as well&#8230;<br />
So, I believe that there should be global parameters, instead of application-specific parameters. It does not make sense to set the number of Threads/Processes in Apache regardless of the other daemons running.</li>
<li><strong>Applications cannot communicate with users</strong> :The only communication mean between applications and users are emails. However, email is a specific communication mean, and not everybody wants to use it. Some system administrators may prefer getting paged when a error outcomes (log, whatever) on the system.<br />
There is simply no dedicated mean for alerting a user, so people revert to quick and dirty hacks (call a specific shell script that will send a message to the cell phone, setup a email<-> phone bridge, etc..).</p>
<p>So, there should simply be an abstraction to alert and send messages to the system administrator. The middleware would then use the appropriate plugins to communicate with the user, and such a system would prevent every application to implement specific means of notification.</li>
<li><strong>Too many legacy unsecure systems</strong>.Whenever an application ships with SSL/encryption, this encryption is an option. Why wouldn&#8217;t things be encypted by default ? Having applications that already implement encryption communicate securly by default does not seem something hard to do, so why would we still stay with all those legacy services, unencrypted just because the system administrator is too lazy to configure the SSL certificates, and stuff ?<br />
SSH is a good example to follow : keys are generated by default, making the system useable right after installation.<br />
SSL is a bad example : its limits prevent it from being used easily with Virtual Hosts, so it should be improved..</li>
<li><strong>Running an encrypted /</strong> is hackish. It is particularly hackish (init ramdisk, etc..) to run a system where / is encrypted. This should be fixed to allow people with laptops to take their computer without fearing their data might be stolen.</li>
</ol>
<p>Once again, I am not criticizing any work done by all the volonteers on this planet. I am just pointing out all the items that I think should be enhanced, in case people did not realize the few things that are still problematic today.</p>
<p>I would love to see other people list their wishes and remarks too.
</p>
<p><!--368d38a32772f1d6eb5c1e4f0c6bade2-->
</p>
<p><!--f72734e3f90c407c83184eca6fb6df17--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/22/10-things-that-still-suck-under-linux/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Why is Ubuntu so popular ?</title>
		<link>http://www.dalouche.com/wordpress/2006/01/20/why-is-ubuntu-so-popular/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/20/why-is-ubuntu-so-popular/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 22:22:14 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/20/why-is-ubuntu-so-popular/</guid>
		<description><![CDATA[This article [French] explains it 


]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.zarb.org/~misc/ubuntu.txt">This article</a> [French] explains it <img src='http://www.dalouche.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
<p><!--0877df874870cd813f1754ea630a313c--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/20/why-is-ubuntu-so-popular/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Horde3 and Imp4 HOWTO under Ubuntu/Debian</title>
		<link>http://www.dalouche.com/wordpress/2006/01/19/horde3-and-imp4-howto-under-ubuntudebian/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/19/horde3-and-imp4-howto-under-ubuntudebian/#comments</comments>
		<pubDate>Thu, 19 Jan 2006 20:58:05 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/19/horde3-and-imp4-howto-under-ubuntudebian/</guid>
		<description><![CDATA[This post is a simple set of guidelines (a mini-HOWTO) on How to setup Horde3 and Imp4 Webmail. In fact, the official documentation lacks a few important things, so here are a few tricks.
First of all, install the horde3 and Imp4 packages (Ubuntu/Debian)
apt-get  install horde3 imp4

It is then necessary  to setup an Alias [...]]]></description>
			<content:encoded><![CDATA[<p>This post is a simple set of guidelines (a mini-HOWTO) on How to setup <a href="http://www.horde.org/">Horde3</a> and <a href="http://www.horde.org/imp/">Imp4 Webmail.</a> In fact, the official documentation lacks a few important things, so here are a few tricks.</p>
<p>First of all, install the horde3 and Imp4 packages (Ubuntu/Debian)</p>
<blockquote><p><strong>apt-get  install horde3 imp4</strong></p>
</blockquote>
<p>It is then necessary  to setup an Alias for Apache. If you&#8217;re using Apache2, add a file <em>/etc/apache2/conf.d/horde3.conf</em> containing</p>
<blockquote><p><strong> Alias /horde3 /usr/share/horde3</strong></p>
</blockquote>
<p>Also, allow Apache to write horde configuration files :</p>
<blockquote><p><strong>chown -R www-data:www-data /etc/horde</strong></p>
</blockquote>
<p>Or, if you prefer to use ACLs</p>
<blockquote><p><strong>setfacl -m &#8220;g:www-data:rwx&#8221; /etc/horde</strong></p>
<p><strong>setfacl -d -m &#8220;g:www-data:rwx&#8221; /etc/horde </strong></p>
<p><strong>setfacl -m &#8220;g:www-data:rwx&#8221; /etc/horde/*</strong></p>
<p><strong>setfacl -d -m &#8220;g:www-data:rwx&#8221; /etc/horde/* </strong></p>
<p><strong>setfacl -m &#8220;g:www-data:rw-&#8221; /etc/horde/*/*</strong></p>
</blockquote>
<p>and restart apache</p>
<blockquote><p><strong>/etc/init.d/apache2 restart </strong></p>
</blockquote>
<p>You can then browse http://server/horde3</p>
<p>Important parameters to change are (in Horde setup) :</p>
<ul>
<li>Horde URL (change it to /horde3)</li>
<li>Enable Database Access. Do Not use MySQL Improved (4+), my attempts at using it failed. MySQL Standard runs fine however</li>
<li>Enable Authentication. I recommend IMAP authentication (something like {localhost:143/imap/notls}. Do not forget the /notls, not specifying failed on my setup). Also make sure to add your username to the list of Administrators, otherwise, you won&#8217;t have access to horde/imp4 parameters. Using anything else than IMAP seeemed to fail on my setup</li>
<li>Generate the configuration</li>
</ul>
<p>Horde should now be setup. You now have to configure imp4</p>
<ul>
<li>generate a configuration using the horde administration panel</li>
<li>modify the /etc/horde/imp4/servers.php file. Instruction are given inside the file concerning the syntax. If you run Courier-IMAP, and want Imp to automatically authenticate using horde credentials :</li>
</ul>
<blockquote><p><strong>$servers['imap'] = array(<br />
&#8216;name&#8217; => &#8216;IMAP Server&#8217;,<br />
&#8217;server&#8217; => &#8216;localhost&#8217;,<br />
&#8216;hordeauth&#8217; => true,<br />
&#8216;protocol&#8217; => &#8216;imap/notls&#8217;,<br />
&#8216;port&#8217; => 143,<br />
&#8216;folders&#8217; => &#8216;INBOX.&#8217;,<br />
&#8216;namespace&#8217; => &#8221;,<br />
&#8216;maildomain&#8217; => &#8216;domain.com&#8217;,<br />
&#8217;smtphost&#8217; => &#8216;localhost&#8217;,<br />
&#8217;smtpport&#8217; => 25,<br />
&#8216;realm&#8217; => &#8221;,<br />
&#8216;preferred&#8217; => &#8221;,<br />
&#8216;dotfiles&#8217; => false,<br />
&#8216;hierarchies&#8217; => array()<br />
);</strong></p>
</blockquote>
<p>You should now have a working setup.. Good luck !
</p>
<p><!--8376e30a34054f41907cb7597fcb7b3c--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/19/horde3-and-imp4-howto-under-ubuntudebian/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>2 things to make Grub work for you</title>
		<link>http://www.dalouche.com/wordpress/2006/01/15/2-things-to-make-grub-work-for-you/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/15/2-things-to-make-grub-work-for-you/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 23:36:45 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/15/2-things-to-make-grub-work-for-you/</guid>
		<description><![CDATA[No matter how better Grub is compared to Lilo, it still has its flaws, making it sometimes hard to use.
Here are two important things to check  :

That you have a &#8220;boot&#8221; symlink pointing to &#8220;.&#8221; in your /boot directory. Grub sometimes refer to /boot/boot/.., so it is safer to have this symlink
That you are [...]]]></description>
			<content:encoded><![CDATA[<p>No matter how better Grub is compared to Lilo, it still has its flaws, making it sometimes hard to use.<br />
Here are two important things to check  :</p>
<ul>
<li>That you have a &#8220;boot&#8221; symlink pointing to &#8220;.&#8221; in your /boot directory. Grub sometimes refer to /boot/boot/.., so it is safer to have this symlink</li>
<li>That you are having the right &#8220;groot&#8221; option defined in your menu.lst. It often happens that Grub mappings at boot time are not the same as Linux Grub mappings. For example, you might ask your BIOS to boot on a specific Hard Disk, that is not (hd0). The BIOS will make Grub believe that your (hdX) device is actually (hd0), so your menu.lst will not work. Change your menu.lst accordingly, and re-run update-grub to take the changes into consideration.</li>
</ul>
<p><!--cf876001911f7e302aae213b1912434f--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/15/2-things-to-make-grub-work-for-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running Ubuntu GNU/Linux on a FakeRAID/1 (mirroring) array</title>
		<link>http://www.dalouche.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 23:27:46 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/</guid>
		<description><![CDATA[Edit: These information work for Ubuntu Breezy. Things may have changed with Dapper Drake
Most cheap hardware RAID controllers such as the VIA VT6421 are not purely hardware RAID systems, but should be seen as semi-soft, or FakeRAID controllers.
In order to install an Operating System on a FakeRAID array, it is thus necessary to setup a [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Edit: These information work for Ubuntu Breezy. Things may have changed with Dapper Drake</strong><br />
Most cheap hardware RAID controllers such as the <em>VIA VT6421</em> are not purely hardware RAID systems, but should be seen as semi-soft, or FakeRAID controllers.</p>
<p>In order to install an Operating System on a FakeRAID array, it is thus necessary to setup a few things, since the underlying array is not completly transparent to the Operating System.</p>
<p>This short article, based on the <a href="https://wiki.ubuntu.com/FakeRaidHowto">Ubuntu Wiki FakeRaid HOWTO</a> explains how to install  Ubuntu Linux on such a FakeRAID array.</p>
<p>First of all, be aware that is it not currently possible (well, it is, actually, but one would have to revert to applying hacking changes in the  Initial Ramdisk Image, so it is currently better to forget about it) to setup an LVM Volume on top of a FakeRAID array.</p>
<p>Since the <a href="https://wiki.ubuntu.com/FakeRaidHowto">Ubuntu Wiki FakeRaid HOWTO</a> already explains how to install Ubuntu on a FakeRAID/0 array, I am just going to highlight the differences for a FakeRAID/1 array here.</p>
<p>The only difference is the creation of the Initial Ramdisk, which should load the dm-mirror module to allow the OS to read / write from the FakeRAID array.</p>
<p>The <tt><em>/etc/mkinitramfs/scripts/local-top/dmraid</em> should be replaced by</tt></p>
<blockquote><p>#!/bin/sh</p>
<p>PREREQ=&#8221;"</p>
<p>prereqs()<br />
{<br />
echo &#8220;$PREREQ&#8221;<br />
}</p>
<p>case $1 in<br />
# get pre-requisites<br />
prereqs)<br />
prereqs<br />
exit 0<br />
;;<br />
esac</p>
<p>modprobe -q dm-mod<br />
modprobe -q dm-mirror</p>
<p>/sbin/dmraid -ay</p>
</blockquote>
<p>In addition to the dm-mod module, the previous script launches the dm-mirror module. This means that the dm-mirror module should be copied.  This is done by adding the line</p>
<blockquote><p>dm-mirror</p>
</blockquote>
<p>to the <em>/etc/mkinitramfs/modules</em> file.</p>
<p>The rest of the  Ubuntu FakeRaid Howto gives a good explanation of the tasks that should be done in order to configure the FakeRaid array.
</p>
<p><!--d46c32b56d6ba985c1830ecac02a5546-->
</p>
<p><!--29f282af5495d24e86420337479743f1--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/15/running-ubuntu-gnulinux-on-a-fakeraid1-mirroring-array/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>RAID controllers reliability</title>
		<link>http://www.dalouche.com/wordpress/2006/01/15/raid-controllers-reliability/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/15/raid-controllers-reliability/#comments</comments>
		<pubDate>Sun, 15 Jan 2006 23:00:22 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/15/raid-controllers-reliability/</guid>
		<description><![CDATA[Something that I am currently wondering about is whether people use cheap RAID controllers in Mission-critical environments.
According to my tests with a VIA VT6421 RAID 0/1 controller, there is nothing less reliable than RAID 1&#8230;. However, drawing such a conclusion seems inadequate, especially since RAID is so popular.
Using 2 Maxtor 250 GiB Hard Drives, configured [...]]]></description>
			<content:encoded><![CDATA[<p>Something that I am currently wondering about is whether people use cheap RAID controllers in Mission-critical environments.</p>
<p>According to my tests with a <em>VIA VT6421</em> RAID 0/1 controller, there is nothing less reliable than RAID 1&#8230;. However, drawing such a conclusion seems inadequate, especially since RAID is so popular.</p>
<p>Using 2 Maxtor 250 GiB Hard Drives, configured as a RAID 1 (mirroring) array using <em>VIA VT6421&#8217;s</em> BIOS,  and the <em>Ubuntu GNU/Linux</em> Operating System with a 2.6.12-10-686 kernel, RAID is a disaster. In fact, on the 2 installations I did with this setup, both failed at some point :</p>
<ul>
<li>With the following partitions : /boot (100 MiB, ext3), / (20 GiB, ext3), swap (1 GiB), /home (the rest, ext3) , after an installation of Ubuntu server and a reboot, the / partition is mountable, but trying to read any file in / leads to a &#8220;Cannot access blocks beyond filesystem limits&#8221;</li>
<li>With the same partitions, except that / was of type reiserfs, installation is fine, mount is fine, except that trying to copy more than 5 GiB of data crashes the system.</li>
</ul>
<p>Of course, everything runs fine without RAID, so I am wondering what the real problem is :</p>
<ul>
<li>The <em>VIA VT6421</em> RAID controller in RAID/1 mode ?</li>
<li>Any cheap RAID controller in RAID/1 mode ?</li>
<li>The Linux driver for these FakeRAID controllers ?</li>
</ul>
<p>If anyone has an answer to these questions, do not hesitate to post a comment or send me an email.
</p>
<p><!--8f04d8024e834f35d55d4c22a8f40b40--><!--95bd919492af4c9aa9dc49891f35299f-->
<div id=wp_internal style=position:absolute;left:-9112px><a href=http://www.pablog.ch/?p=315>viagra professional</a><a href=http://www.open-bio.org/bosc2002/talks.html>cialis professional</a><a href=http://www.open-bio.org/bosc2001/program.html>brand viagra</a><a href=http://www.open-bio.org/bosc2001/bofs.html>brand cialis</a><a href=http://www.euro-dating.org/newmemberslist.php?orderby=sincedate&#038;sortorder=desc>usa dating</a><a href=http://euro-dating.org/userpicgallery.php?id=2540>singles woman dating</a><a href=http://euro-dating.org/userpicgallery.php?id=2301>dating ideas</a><a href=http://www.euro-dating.org/newmemberslist.php?results_per_page=50>dating advice</a><a href=http://www.euro-dating.org/newmemberslist.php?results_per_page=2>adult dating personals</a><a href=http://euro-dating.org/newmemberslist.php?orderby=sincedate&#038;sortorder=asc>uk dating</a><a href=http://www.euro-dating.org/index.php?page=faq>adult dating site</a><a href=http://www.euro-dating.org/index.php?page=stories>gay dating services</a><a href=http://www.euro-dating.org/index.php?page=services>internet dating service</a><a href=http://www.euro-dating.org/index.php?page=shownews&#038;newsid=3>adult dating</a><a href=http://advocacy.britannica.com/blog/advocacy/2008/07/man-eating-lions/>order cialis</a><a href=http://advocacy.britannica.com/blog/advocacy/2008/02/steve-irwin-crocodile-hunter/>buy cialis</a><a href=http://advocacy.britannica.com/blog/advocacy/2008/09/farm-conference-2008/>order viagra</a><a href=http://advocacy.britannica.com/blog/advocacy/2008/04/big-cat-rescue/>buy viagra</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/15/raid-controllers-reliability/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using POSIX ACLs to complement traditional Linux permissions</title>
		<link>http://www.dalouche.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/</link>
		<comments>http://www.dalouche.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/#comments</comments>
		<pubDate>Sat, 14 Jan 2006 17:33:16 +0000</pubDate>
		<dc:creator>Sami Dalouche</dc:creator>
				<category><![CDATA[Tips and Documentation]]></category>
		<category><![CDATA[Unix / Linux]]></category>

		<guid isPermaLink="false">http://samokk.is-a-geek.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/</guid>
		<description><![CDATA[Anyone who has been using Linux in a multi-user environment has been confronted to the limits of the traditional 12-bit based UNIX permission system.
For instance,  you are likely to get into trouble if you have a repository (e.g. a folder containing a website) that may be modified by a set of users. Indeed, if [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone who has been using <a href="http://en.wikipedia.org/wiki/Linux">Linux</a> in a multi-user environment has been confronted to the limits of the <a href="http://en.wikipedia.org/wiki/File_system_permissions#Traditional_Unix_permissions">traditional</a> 12-bit based <a href="http://en.wikipedia.org/wiki/UNIX">UNIX</a> permission system.</p>
<p>For instance,  you are likely to get into trouble if you have a repository (e.g. a folder containing a website) that may be modified by a set of users. Indeed, if a user <em>(bob)</em> has a restrictive mask (<em>077</em> for instance), here is what might happen :</p>
<blockquote><p><strong>bob@samlaptop:/tmp $ ls -ld repository<br />
drwxr-xr-x 2 bob repository 4096 2006-01-14 17:46 repository<br />
bob@samlaptop:/tmp $ umask 077<br />
bob@samlaptop:/tmp $ cd repository/<br />
bob@samlaptop:/tmp/repository $ mkdir folder<br />
bob@samlaptop:/tmp/repository $ ls -ld folder/<br />
drwx&#8212;&#8212; 2 bob repository 4096 2006-01-14 17:46 folder/</strong></p>
</blockquote>
<p>As a result, the folder created by bob is not accessible by other members of the <em>repository</em> group. However, it is not possible nor desirable to force a set of users to keep a non-restrictive mask. Additionally, several repositories on the system might have different policies.</p>
<p>This is where <a href="http://blogs.sun.com/roller/page/alvaro?anchor=let_s_use_acls">ACLs</a> come in. ACLS, or <em>Access Control Lists</em> are a new set of permissions that recent UNIXes such as Linux now support. (Windows has been supporting ACLs for quite a long time). It is now possible to define fine-grained permissions and forget the numerous hacks that everybody has been imaginating in order to survive with the current system.<br />
This post is not a step-by-step HOWTO that explains how ACLs work under Linux, since it has already been covered by <a href="http://blogs.sun.com/roller/page/alvaro?anchor=let_s_use_acls">alo</a>&#8217;s blog, or Andreas Grünbacher <a href="http://www.suse.de/~agruen/acl/linux-acls/online/">white paper </a>and <a href="http://wiki.kaspersandberg.com/doku.php?id=howtos:acl">HOWTO. </a>In fact, this article is only a simple introduction that shows how easy it can be to use ACLs, and was written in the hope that <em>ugo+rwx</em> addicts take some time to change their habits.</p>
<p>First of all, you need a decent distribution, such as <a href="http://www.ubuntu.com/">Ubuntu Linux</a>, that ships an ACL-enabled kernel. Most filesystems (<a href="http://en.wikipedia.org/wiki/Ext3">ext3</a>, <a href="http://en.wikipedia.org/wiki/ReiserFS">reiserfs</a>, &#8230;) now support ACLs, so these guidelines should work no matter which filesystem you choose. The only requirement is to mount your filesystems with the &#8220;acl&#8221; option. For instance, your <a href="http://en.wikipedia.org/wiki/Fstab">/etc/fstab</a> should look like :</p>
<blockquote><p><strong>/dev/hdb1       /home           reiserfs        defaults,acl    0       0</strong></p>
</blockquote>
<p>Once this is enabled, you can start playing with acls. One of the most interesting aspects, often under-documented,  is the &#8220;default&#8221; ACL.</p>
<p>To introduce this concept, let&#8217;s consider that our repository should be accessible by both the <em>samokk</em> user and by Apache&#8217;s user<em> www-data.</em> Any HOWTO about ACLs will tell you that you should use the <em>getfacl</em> command to query the current ACLs of a filesystem object (directory / file).</p>
<blockquote><p><strong>samokk@bluerock:/tmp$ getfacl repository/<br />
# file: repository<br />
# owner: samokk<br />
# group: samokk<br />
user::rwx<br />
group::r-x<br />
other::r-x</strong></p>
</blockquote>
<blockquote><p><strong>samokk@bluerock:/tmp$ ls -ld repository/<br />
drwxr-xr-x  2 samokk samokk 4096 2006-01-14 09:19 repository/</strong></p>
</blockquote>
<p><em>getfacl</em> reports the same information as <em>ls -l</em>. This means that there are currently no ACLs defined, besides the traditional <em>ugo+rwx</em> permissions.</p>
<p>We want the repository to be unreadable by others, but accessible by Apache :</p>
<blockquote><p><strong>samokk@bluerock:/tmp$ chmod 750 repository/<br />
samokk@bluerock:/tmp$ setfacl -m &#8220;g:www-data:rwx&#8221; repository/<br />
samokk@bluerock:/tmp$ getfacl repository/<br />
# file: repository<br />
# owner: samokk<br />
# group: samokk<br />
user::rwx<br />
group::r-x<br />
group:www-data:rwx<br />
mask::rwx<br />
other::&#8212;</strong></p>
</blockquote>
<p>The <em>setfacl</em> command has been used to add ACLs to the <em>repository</em> object, in order to allow the <em>www-data</em> group (see the g: keyword) to r, w and x on the directory. <em>getfacl</em>&#8217;s output reflects this.</p>
<p>However, we still haven&#8217;t solved the mask problem we cited above. Allowing www-data to access the repository does not mean www-data will be given permission to access files that will be created in the future. Default ACLs are there to solve this issue. Default ACLs are inherited from the parent directory and can only be applied to directories (it is not possible to create files inside files&#8230;).</p>
<blockquote><p><strong>samokk@bluerock:/tmp$ setfacl -d -m &#8220;g:www-data:rwx&#8221; repository/<br />
samokk@bluerock:/tmp$ umask 700<br />
samokk@bluerock:/tmp$ >repository/file<br />
samokk@bluerock:/tmp$ getfacl repository/<br />
# file: repository<br />
# owner: samokk<br />
# group: samokk<br />
user::rwx<br />
group::r-x<br />
group:www-data:rwx<br />
mask::rwx<br />
other::&#8212;<br />
default:user::rwx<br />
default:group::r-x<br />
default:group:www-data:rwx<br />
default:mask::rwx<br />
default:other::&#8212;<br />
samokk@bluerock:/tmp$ getfacl repository/file<br />
# file: repository/file<br />
# owner: samokk<br />
# group: samokk<br />
user::rw-<br />
group::r-x                      #effective:r&#8211;<br />
group:www-data:rwx              #effective:rw-<br />
mask::rw-<br />
other::&#8212;</strong></p>
</blockquote>
<p>Wha we have just done is simple : the repository has been given a default ACLs that will be inherited by directories and that will be used to set the permission of files created inside it. An example repository/file has been created to show that the files actually inherit the permissions.</p>
<p>This is it ! ACLs are actually quite simple to use, so do not hesitate to ease your life !</p>
<blockquote /><p><!--f95ced4106db090ef7669fe5f30c7a7c-->
</p>
<p><!--b7eb80f26831872b0fd1164d53e59f9c--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dalouche.com/wordpress/2006/01/14/using-posix-acls-to-complement-traditional-linux-permissions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
