2005-03-20 23:59

UNIX stuff that makes no sense ( the rant)

First of all, I love Linux. I have used it exclusively since about 1994 (yeah, the last Windows I actually used for real was WfW 3.11).

Let's see how it makes no sense.

The Bin

Your system has /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin 6 different binary locations.

What sense does it make to split bin and sbin? It only makes it harder for regular users to use tools the can need, like netstat and ifconfig.

As for /bin and /usr/bin, it makes little more sense, if at all. Sure, put a basic, functional system outside /usr, because /usr can be a network FS. Well, who does that?

I mean, I have seen all-local and all-network systems, but I have never seen a /-local, /usr-remote system in ten years.

And I suppose someone does it, but that doesn't mean it makes sense. If you want a real, functional, unbreakable system you can use in case of network failure: use a separate partition. Or use a Live CD. Or use a floppy. All of those are more resilient than your /.

As for /usr and /usr/local... that's just a throwback to when people were scared of installing software. People should install packaged software anyway.

The Libs

/lib /usr/lib and /usr/local/lib. Just as much sense as the above.

The variable

/usr and /var. Here's what I think I heard: /usr is for unchanging application data (bins, libs, docs, etc.) /var is for mutable data (logs, spools, caches).

That way, you put /var in a separate partition and if apps run amok, your / doesn't fill.

Well... ok, I suppose. Except that the right way to handle that is to make sure your apps don't freaking run amok!

Say, logs? Rotate them by size, not by date!

Spools? Use disk quotas, and maximum sizes!

Caches? They should be space-limited.

And all services should be kind enough to figure out when your disk is about to burst and do something graceful with it.

Finally: if your /var fills, all your services will crash just as hard as if / filled. So what's the point? That you can log into the crashed box and fix it? You can do that with a full /, too.

The root of all evil

We live with the concept of a single almighty admin. Why?

If every service application had a single point of configuration and monitoring (ie: /etc/app and /var/service/app (in runit ;-) and /var/log/app, it would be trivial, using ACLs, to allow partial management of the system.

Sure, there would be a real root for stuff like password management and such, but that's not so bad.

Why has no one bothered doing this?

Permission to barf

The Unix permission system is at the same time harder and less powerful than ACLs. That only on the last two years it has become practical to use ACLs on Linux, and that still you can't count on them in every distro is... ugly.

I could go on, but... I think you get the idea. Coming some day: a proposal to fix the mess.

Comments

Comments powered by Disqus

Contents © 2000-2019 Roberto Alsina