Finally, Ubuntu uses a more updated Linux kernel than Fedora

Historically, Ubuntu focuses on the user experience such as beautiful graphical user interface, while Fedora focuses on performance. In the other words, the kernel in Fedora distribution is more up-to-dated.

I just upgraded by Ubuntu 10.04 to 10.10 (released on October 10, 2010), I found that the Linux Kernel in Ubuntu is more advanced than Fedora. I am surprised!

#cat /etc/lsb-release && uname -a

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.10
DISTRIB_CODENAME=maverick
DISTRIB_DESCRIPTION="Ubuntu 10.10"
Linux 2.6.35-22-generic #33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux

and for Fedora 13:

#cat /etc/redhat-release && uname -a
Fedora release 13 (Goddard)
Fedora release 13 (Goddard)
Linux 2.6.34.7-56.fc13.x86_64 #1 SMP Wed Sep 15 03:36:55 UTC 2010 x86_64 x86_64 x86_64 GNU/Linux

Our sponsors:

Comments on running webservers at home – Part 1

I like to experiment all kind of computer technologies especially server applications. I am not one of those who is satisfied with just making a website and putting it in somewhere. I like the full control of the server because I like to try different combination of applications for performance tuning. For example, I doubt regular web hosting company allows you to host the entire system on a ram disk with a reasonable price tag. That’s why I choose to host a server at home. That’s a lot cheaper, plus I have the full control. However, running server application may generate lots of upstream traffic. That’s why most internet server providers (such as Charter) do not allow their customers to run any server related applications using their internet connection service. They do it by blocking most service related common ports, e.g., 80 (HTTP), 21 (FTP), 22 (SSH) etc. So there is really nothing you can do other than hosting your applications on different ports.

Two years ago, I started hosting all of my websites using my own computers. I found a number of benefits.

Benefits of hosting websites at home

1. It saves me tons of money.

I was paying $72/year per domain for web hosting. Since I have more than ten domains, the total running costs per year is pretty high. This amount is really nothing comparing to the cost of the electricity.

Monthly cost for web hosting:

$72 per domain/yr * 10 domains / 12 months
= $60 per domain / month

My monthly electricity cost at home, which includes everything such as running 10 non-gaming computers, washer, dryer, lighting etc:

$80 / month

I haven’t tried measuring the exact energy but you can imagine the electricity used by computers should be under $10 / month.

2. It is fun (and environmental friendly too).

I have few stone-age computers including a Pentium II laptop, a Mac G3 (speed wise similar to Pentium II), a Pentium M Celeron laptop etc. I integrated them to a web server farm (web clusters). Since running a web server does not require a lot of CPU power, they are doing okay for hosting low-traffic websites. Also, it is cool to show off my friends the global data center that I build for my websites.

3. Your data is secured!

Have you ever heard of any bank host their web sites on web hosting? No matter what type of encryption you use for your web applications, you still need to process the raw, original, and unencrypted data on the server side at one point. Processing confidential information on a shared server is like talking your secrets in a study room in a public library. You think you are in an isolated environment, but you can be surveillanced, it’s very simple and easy.

Here is an example:
Supposes I have a web application which accepts the confidential information from my users, and all traffics are encrypted. After the confidential information is decrypted on the server-side, my web application processes the raw information and do further things.

Let’s say the server environment is Apache + PHP + MySQL, the most popular combination of web application environment. Since they are all open-source, it is very easy to modify the source codes and log every single thing into a file, including the raw, original, unencrypted data processed by my web application.

You may think this may require lots of work and it will never happen on you. What if your competitor wants your confidential information? It doesn’t cost much to hire someone to do it.

Sounds scary?

More scary things come along. Shared web hosting (hosting multiple domains on one single server) always come with lots of trouble that many people are ignored. In theory, every website on a shared hosting lives in a virtual, independent environment, think about it as a virtual machine like VMWare or Hyper-V. Practically, it is not easy to set up such environment (e.g., FreeBSD Jail) and many web hosting companies choose to go with a less difficult path, because customers will not realize it anyway. Now here is the interesting part, supposes my domain and your domain are hosted on the same server. I can access the resource at the operating system level first (which will required some hacking), then access your file after that. Now I have access your source code and I can do whatever I want.

The most secure place in the world is the place that can be accessed by you, and no body else, i.e., your home, or any place you have full control

Our sponsors:

Think twice before upgrading your server to PHP 5.3.3

I upgraded to PHP 5.3.3 today, and I was shocked! I found a huge security hole default setting change that may leak the source code to public, which never happened in the earlier version.

Here is an example. Suppose my code looks like this:

<?php

echo "This is a good example";

?>

Everything will turn out fine. Here is the result:

Good Example

However, if the open tag is changed from <?php to <?:

<?

//My comment
echo "This is a bad example";

?>

Then PHP 5.3.3 will not recognize the code within the < ? and ?> tag. Instead, it will parse it as a regular text file, i.e., your users will see the code. Here is the result:
Bad Example

I know that it happens on PHP for Windows (XAMPP for Windows), but I didn’t know that they move this new feature to Unix world.

Update:
Thanks for the help from bt garner, it is pretty simple to fill this security hole.

First, open the php.ini. If you are not sure where is it, you can run the following command to locate it:

sudo find / -name "php.ini"

And activate the following parameters:

short_open_tag = On

That’s it!

–Derrick

Our sponsors:

How to join file.1, file.2, file.3…

Today, I found a list of files ending with .1, .2, .3 etc. Initially, I thought I could simply join them together, i.e.,

Using hjSplit on Windows, or cat on Unix:

cat file.1 file.2 file.3 > file

Unfortunately, it doesn’t work out. After searching on google, I found that a Spanish software called Hacha can solve this problem. You can download Hacha from here.

Our sponsors:

iLeopard Mail for Thunderbird 3.1

iLeopard Mail has been my favorite Thunderbird theme for a long time. Recently, I upgraded to Thunderbird 3.1 and I found that this theme is no longer available. Since I cannot find any theme that is similar to iLeopard Mail, I decide to upgrade the theme and make it compatible with Thunderbird 3.1.

Here is the instructions on how to make iLeopard Mail compatible with Thunderbird 3.1:

1. Click here to download iLeopard Mail for Thunderbird 3.1

2. Open Thunderbird

3. Tools –> Add-ons –> Themes

4. Click the Install button

5. Select the file you just downloaded, i.e., ileopard_mail-3.2.4-tb.jar

6. Click the Install button again

7. Restart Thunderbird if needed

8. Depends on how many theme is installed in your Thunderbird, it may or may not load the new theme automatically. You may need to activate the theme:

Enjoy your iLeopard Mail on Thunderbird 3.1!

Our sponsors:

Copycat is the royal road to success

After Google followed Bing to put the wallpaper on their page, its stock price has grown up for $8.31 in about 90 minutes today.

Update an hour after the post: It seems that the stock price has something to do with the quality of the wallpaper:

Our sponsors:

fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ngx-fancyindex-0.2.2.tar.bz2: File unavailable (e.g., file not found, no access)

Today I tried to run the upgrade my nginx on my FreeBSD box, and I received the following message:

===>  Vulnerability check disabled, database not found
===>  License accepted by the user
===>  Found saved configuration for nginx-0.7.66
=> ngx-fancyindex-0.2.2.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://connectical.com/attachments/download/26/.
fetch: http://connectical.com/attachments/download/26/ngx-fancyindex-0.2.2.tar.bz2: Not Found
=> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/.
fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ngx-fancyindex-0.2.2.tar.bz2: File unavailable (e.g., file not found, no access)
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/ and try again.

Obviously, the FreeBSD box could not download the file. To fix this problem, simply run the following commands:

cd /usr/ports/distfiles/
sudo wget http://files.connectical.com/gentoo/ngx-fancyindex-0.2.2.tar.bz2

This will allow FreeBSD to skip downloading the file from a wrong URL. Now, go back to the nginx port:

cd /usr/ports/www/nginx

and try to install nginx again:

sudo make install clean

Our sponsors:

-bash: /dev/null: Permission denied

Recently, I found that Ubuntu gives the following error when I log in to the system:

-bash: /dev/null: Permission denied

After I run the following command, the problem is gone:

sudo chmod 0666 /dev/null

Our sponsors:

Softlink / Symbolic Link doesn’t work on Samba – Solved

After upgrading my Samba servers (One is Ubuntu Linux, and the other one on Fedora Linux), I found that I can no longer access the symbolic links / soft links from Windows. It keeps returning “permission error”, “You don’t have permission to access this folder” etc. I am pretty sure that it has nothing to do with my user permission settings because it was working just fine before the upgrade. After trying several solutions, here is what I come up:

Edit your samba configuration file:

sudo nano /etc/samba/smb.conf

Add the following into the global section, i.e.,

[global]
...
follow symlinks = yes
wide links = yes
unix extensions = no
...

Save your file and restart Samba:

sudo /etc/init.d/samba restart

It should work now.

Our sponsors:

Ubuntu 10.04 – Can’t boot / Can’t install – Solved

Since Ubuntu 10.04 is out officially, I like to give it a try on my media server.

FYI, here is the specification of my media server:

Athlon 64 X2 4600
Chipset: GeForce 6150 LE
Motherboard: Asus A8M2N-LA
Harddrive format: IDE

Note that this is a 2006 model and the system was installed on an IDE drive. That may be the reason why the new Ubuntu 10.04 doesn’t like. Anyway, I tried to install Ubuntu 10.04 using three different methods. Here is the detail:

Trial 1 – Fresh install with Ubuntu 64-bit Desktop installation

Won’t even get into the installation menu.
After selecting to boot from CD, the system was stuck in the blank screen. It couldn’t even go further to the installation welcome menu. So I moved to the the next option.

Trial 2 – Fresh install with Ubuntu 64-bit Alternate installation

Better – But can’t reboot.
The installation went very smooth without a single problem. However, after the installation was completed, it couldn’t boot to the Ubuntu system.

Trial 3 – Upgrade from Ubuntu 9.10 64-bit Desktop installation

Works!
This time, I performed a fresh install using Ubuntu 9.10 64-bit Desktop first. The installation went very smooth. After the installation, I did the following in order:

  1. Updated the hardware driver such as graphic and audio.
  2. Updated the the package information:

    sudo apt-get update -y
  3. Upgraded the system to the latest kernel:
    sudo apt-get dist-upgrade -y
  4. Reboot
  5. Now the Ubuntu 9.10 should be ready to move on the next version.

Next, go to System -> Admin -> Software Update

It will give prompt you that a new version of Ubuntu is available. Click that, follow the instructions and you are done!

Note: I’ve tried upgrading the Ubuntu from command line but it failed. Probably there are some differences between the GUI upgrade and the command line upgrade tool.

Enjoy your new Ubuntu, it is really cool!

What about upgrading from Ubuntu 9.04?

I haven’t tried upgrading from Ubuntu 9.04 to Ubuntu 10.04 before, so I cannot comment. However – I tried upgrading from 9.04 to 9.10 and it failed (from command line and GUI). The system could not boot after the upgrade. FYI, here is the specification of my machine:

Mac G3 400MHz
Harddrive format: IDE

It could be the reason of a different architecture (It is a Power PC instead of i386/amd64). Since it is a 10 yrs old machine, I didn’t spend too much effort to investigate.
By the way, I also tried to install Fedora 12 on this machine and it gives the same problem, i.e., Installation goes fine but the system could not boot.

Our sponsors: