(   )
                          (    )
                           (    )
                          (    )
                            )  )
                           (  (                  /\
                            (_)                 /  \  /\
                    ________[_]________      /\/    \/  \
           /\      /\        ______    \    /   /\/\  /\/\
          /  \    //_\       \    /\    \  /\/\/    \/    \
   /\    / /\/\  //___\       \__/  \    \/
  /  \  /\/    \//_____\       \ |[]|     \
 /\/\/\/       //_______\       \|__|      \
/      \      /XXXXXXXXXX\                  \
        \    /_I_II  I__I_\__________________\
               I_I|  I__I_____[]_|_[]_____I
               I_II  I__I_____[]_|_[]_____I
               I II__I  I     XXXXXXX     I
            ~~~~~"   "~~~~~~~~~~~~~~~~~~~~~~~~

Sat, 23 May 2009

A Sysadmin's Lament, or why cPanel Sucks

I've been wrestling with cPanel [0] on and off for years - more lately, and it always reminds me just how much it sucks. It can be convenient if you don't know how to maintain Linux servers and the various associated Internet services (Apache, BIND, etc.), but there really is no playing nicely with it from a command line sense. Once installed, it takes over your system, rendering it impervious to standard sysadmin tricks. What's more, its convenience is really it's downfall, because when something goes wrong with it, two things are true:

  1. The person using it has no idea what is wrong, OR
  2. The person using it knows what is wrong and how to fix it, just not from within cPanel

The end result of this is when cPanel fails, and it will fail at some point, fixing it is near impossible without calling on cPanel for support (I suppose they like it that way).

It's also one example of a software system that if it were open source, it wouldn't change this situation at all. It's basically a giant mass of Perl code that somehow manages to work (mostly), while aggravating the experienced sysadmin. Its automated upgrades are one example of an epic fail waiting to happen. On several occasions I've had clients call me to fix broken email, only to find a cPanel upgrade has b0rked some key part of the Exim config file. Umm...first, upgrading key system software is not to be taken lightly, and let's not even discuss why the fuck Exim is being upgraded automatically. Second, upgrades should never, and I mean never touch config files without asking. Debian has it right on this one [1]. Do yourself a favor - turn off cPanel upgrades immediately after installation (or better yet, don't install it).

Finally, I can't possibly let this post go without whining about how cPanel and all the other web-based hosting/sysadmin control panels have created an entire generation of so-called 'system administrators' in need of a giant clue bat.

There, I feel better now.

posted at: 09:09 | path: / | permalink | Linux, Sucks, Sysadmin, cPanel

Thu, 21 May 2009

Cool Emacs Hacks

I'm an Emacs-guy, have been for a long time. As much as I use vi from time-to-time, I never could get into modal editing. Despite having used GNU Emacs as a programmer for years, I still learn cool Emacs-fu all the time. Here are a few recent findings:

I do a lot of Perl web development, meaning Perl but also CSS, HTML and Javascript are in the mix, sometimes all in the same file. Emacs' MMM-mode [0] works really well if you want to color-highlight the syntax of disparate languages in the same buffer. Here is the configuration I use in my .emacs:

read more after the break...

posted at: 13:08 | path: / | permalink | Emacs, Hacks, MMM-mode, Perl, Web Development

Thu, 14 May 2009

Google is the Internet

Apparently, Google has become synonymous with the Internet. Everyone panicked today because Google search and apps were down [0]. I got an email from a client during the outage asking what could be the cause of the "slow internet". Google really has become the Internet for most people.

Speaking of Google, I stopped using their services a while ago after they surreptitiously enabled web history on my account. I had previously opted-out of web history, and only noticed it when I was going through my account settings one day. If you, like me, kept a Gmail window open all the time and never logged out, all your web and search history was being collected. Nice.

posted at: 17:55 | path: / | permalink | Privacy, WTF

Tue, 12 May 2009

Clueless Admins

Some people have no business maintaining Linux servers. I recently had someone ask me to fix his non-working LAMP web app. He gave me the contact details of the web host admin. So you can be spared the pain I went through, here are six warning signs you might be dealing with a novice Linux admin:

  1. You notice the "X-Mailer: Microsoft Windows Mail..." in your email correspondence with said admin.
  2. You ask for SSH shell access and are told to use puddy [sic].
  3. You ask again for SSH access details and are told to "just select the host from the dropdown menu".
  4. You are finally able to log in to the hosted account. Of course most everything under the web root has permissions 666 and 777, because "nothing worked unless we did that".
  5. There are a multitude or random iframe and pr0n infestations [see the previous item].
  6. When you ask for root access to fix the egregious permissions issues, are told no, because that would change permissions "system-wide". And besides, he adds for good measure, "You could really screw things up".

posted at: 11:45 | path: / | permalink | Linux, Sysadmin, WTF

Sat, 09 May 2009

Where Did My Content Go?

I realize businesses need to make money and advertise, but why must I be bombarded with advertising 24x7? Tell me why I should pay good money to watch commercials on cable TV? Shouldn't I get commercial-free TV if I pay for it?

The Internet is even worse. With few exceptions, it's hard to find real information on the Internet today, now that it is buried amongst ads and embedded videos and bloated flash and web 2.0 nonsense. I don't want to see that crap. If you want to make money, put some *useful* content online, and make it accessible. People will donate, or buy your product, or use your services. For technical consultants, putting useful (free) technical content online is a great way to build a reputation and get referrals. And forget about text-mode browsing anymore. I often imagine blind computer users pulling their hair out when confronted with flash-only sites (flash-only navigation menus are a particularly evil invention).

Link/blog aggregator sites have gotten out of hand, too. I recently saw the title of an article I wanted to read in my RSS reader ("It's not the Gates, but the Bars" by Richard Stallman [0]). I clicked on the link which supposedly led to the article, but this led to a blog aggregator site with a helpful link to what it said was the "original story". I clicked on that link, which was a blog with comments on the original article. I clicked on another link, which finally led to the original article. I then clicked on the "print this story" link to actually read the content without it being surrounded by ads and moving pictures. Sheesh.

posted at: 02:45 | path: / | permalink | Gripes, Internet

Thu, 07 May 2009

Scary Code Department

What could possibly go wrong with this snippet of PHP code from a web-based CMS? Ignore the lack of error checking...

function publish_page($ID) { $page = $this->render($ID); $path = $this->div_path($page[1]); $file = $path.$page[2]; # Write file $handle = fopen($file, "w"); fwrite($handle, $page[0]); fclose($handle); chmod($file, 0666); $user = $this->auth->user; $this->db->q("update pages set published=now(), user='$user' where id='$ID'"); return "$page[3] published...<br>"; }

Yup, it's a well-behaved CMS that publishes your files and makes them world-writable.

posted at: 10:11 | path: / | permalink | badcode, php, wtf

Wed, 06 May 2009

Linux is Boring, or Saved by the Slack

I've always thought that Linux would be less popular with hard-core geeks once it became mainstream - that the initial attraction was Linux's unpolished installation and configuration, how it let you get your "hands dirty". I started with Red Hat Linux back in 1995, and spent many long nights configuring and tweaking to get a usable system. The thrill was in the learning. I've recently found myself bored with Linux, I think mainly for the reason that there is no challenge anymore, no sense of accomplishment. Much of the user experience is now hidden beneath layers of graphical abstraction. I certainly do appreciate this, and use Ubuntu myself on my work boxen, as there are times you just have to get stuff done. But I still like to tweak and fiddle. There are also times when things go wrong, and simplicity rules.

read more after the break...

posted at: 14:08 | path: / | permalink | linux, slackware