Server Secrets
By
Old Tom
Part One:
Remembering the Mid 20th Century
As your web business grows bigger and bigger, you will probably need to begin using other peoples' software. You might install a shopping cart, or use a gallery page builder... but sooner or later, you'll have to learn more about scripts and files.
Have you ever had a "permissions problem" with your unix/linux server? That's what I'm here to explain.
Well, no, that's not quite true. I'm here to explain several Server Secrets. The "permissions problem" is only one of those secrets. Unfortunately, this stuff is incredibly boring. We're not talking plain boring here... we're talking sadistically boring. But, if you survive the experience, you may never have to ask for help with your server again.
For our purposes, unix and linux mean the same thing. If you are on a unix-like server, this essay applies to you. FreeBSD, Red Hat, Slackware, Linux, Solaris, all refer to flavors of unix.
I am not here to teach you unix. I am here to help you survive unix as a webmaster.
File Ownership
Let's start with perhaps the trickiest concept of all - file ownership. I'm sure you're too young to recall this, but back in the mid 20th century, there was something known as a typewriter. A typewriter typically had one owner - that is, any specific typewriter was only used by one person.
In the same way, your laptop or desktop computer is probably a single-user machine. You don't need to worry about working around or interfering with somebody else's files. You might worry about people snooping, but that's a different issue. Generally speaking, each person has his or her own personal computer.
There was, of course, a gap between everyone (or everyone's secretary) having a typewriter, and everyone having their own personal computer. We had computers, but they were shared. On a small to medium scale, we had departmental computers. Each person had their own account. Same computer, different accounts, just like your local bank. That's how we kept things separate.
That's when unix came to be. Unix evolved on medium-sized computers, in universities and research laboratories. Same computer, different accounts. Therefore, the idea of ownership became extremely important. Every file, every transaction is owned by somebody, and who that somebody is, makes a difference as to how that transaction is handled.
Again, think about how things happen at your local bank. Every dollar, every coin - and most certainly every ball point pen - is owned by somebody, and in every case it's completely clear who that somebody is. You have an account number; other people have an account number, and those numbers do not get mixed up. Keeping those account ownerships separate is a fundamental part of the system.
In the same way, different bank employees can do different things. At my bank, the lady at the information desk can handle non-cash transactions such as depositing my MaxCash payout check. But only the teller can handle a wire transfer.
Fool me twice, prepare to die."
Klingon Proverb, Star Trek




