2002 07 04

                    LINUX NEWS
        Resources & Links From CramSession.com
             Thursday, July 4, 2002


1) Sean’s Notes

2) Linux News

New Apache Worm
An Open Source Success Story
Mandrake's View on United Linux
Public Disclosure and Apache

3) Linux Resources

TCP/IP Meets Chaos Theory
Seven Common SSL Pitfalls
Configuring GDM
TCP/IP Troubleshooting

4) App o’ the Week

~~~~~~~~~~~~~~~~~~~~~~ ADVERTISEMENT ~~~~~~~~~~~~~~~~~~~~~~~

Gain study time and enhance your learning! Hear hundreds of certification exam questions on audio CD or cassettes. Learn while you commute to and from work, exercise, or walk the dog. Ideal for those times when you can’t read. 90-day money back guarantee if you are not happy.


For information on how to advertise in this newsletter
please contact mailto:adsales@CramSession.com or visit

1) Sean's Notes

Last week we looked at file permissions, which allow you to
control who can access various files.


To recap, a file has permissions, an owner, and a group:

-rw-rw-r--   1 root    disk     629 Jun 22 00:48 /etc/dumpdates

Here, /etc/dumpdates is owned by the root user and the disk
group, is writable by both the user and the group, and readable
by everyone.  (Remember that there are three groups of three
characters in the file mode, corresponding to owner, group, and
everyone).  In octal, read-write is 6 (4 for read, 2 for write),
so the file permission is 664.  In this particular instance, the
disk group has write permission because it's used for things
like backups.  (If you check the raw devices for your hard drive,
such as /dev/hda1, you'll see that "disk" has permissions to read
the device too.)

But that first character, it's an odd one.  It's there to specify
what kind of file you're looking at, including a directory:

# ls -ld /etc
drwxr-xr-x   59 root     root         5120 Jun 30 14:11 /etc

Here, the /etc directory has a 'd' as the first character in the
file mode.  Just like files, it has an owner and a group (both
root in this case), and permissions.  The owner has read, write,
and execute, where both the group and everyone else have just
read and execute.

Execute, as I showed last week, makes the file available to be
run.  In the context of a directory, though, what does it do?
As usual, an example will clear it up.

$ cd /tmp
tmp$ mkdir foo
tmp$ touch foo/file
tmp$ ls foo
tmp$ ls -ld foo
drwxrwxr-x    2 sean     sean         1024 Jul  3 20:46 foo

So, here is a directory called /tmp/foo, with a file aptly named
"file".  The permissions on foo are 775, meaning that unless
you're the owner, or in the group, you don't have the write bit
set.  Removing the x bit to everyone:

tmp$ chmod -x foo
tmp$ ls -ld foo
drw-rw-r--    2 sean     sean         1024 Jul  3 20:46 foo
tmp$ cd foo
bash: cd: foo: Permission denied
tmp$ chmod +x foo
tmp$ cd foo

Without the x bit, you can't change into a directory.

What about the "read" bit?

tmp$ chmod 777 foo
tmp$ ls foo
tmp$ chmod 111 foo
tmp$ cd foo
foo$ ls
ls: .: Permission denied

With the execute bit there, we can change into a directory, but
without the read bit, can't get a directory listing.

The write bit should be pretty easy to figure out:

tmp$ chmod 555 foo
tmp$ touch foo/file2
touch: creating 'foo/file2': Permission denied

In case you didn't guess, you need the w bit to create or delete
files (yes, you can edit files if the file itself gives you

So, some common usages.

700 - Private directory, no one can see in

755 - Publicly readable directory.  You can create files,
      everyone else can only read.

777 - World read/write.  Be careful, because anyone can erase
      anyone else's files!

711 - Full access for you, everyone else can change into your
      directory, but can't even get a directory listing.

What good is that last one?  Take for example Apache, where you
can create a public_html directory to serve user files.  If you
hit http://server/~sean/, you'd get whatever is in that
public_html directory.  To access that directory, though, the
server (running as user "nobody") will have to change into
/home/sean/public_html.  It isn't going to get to public_html
without the execute bit on /home/sean.  public_html itself is
usually 755, which allows the web server to see what's there.

Now you're all set to apply permissions to files and directories.
There are still some special options to go, we'll catch those
another time.

Just as a note to anyone who emailed me in the past while and
ended up with a bounce message, there were some problems on the
email server.  It's all cleared up now, though.

Long live the Penguin,


2) Linux News

New Apache Worm
This worm exploits the recently announced vulnerability in
the Apache web server. It'll only get root on FreeBSD
systems, though it's only a matter of time until Linux and
Solaris versions hit the streets. Upgrade Apache, folks!


An Open Source Success Story
Marty Roesch is the creator of Snort, an amazing intrusion
detection system. It started out as a hobby, but has turned
into a profitable venture. Read on to find out how he did it.


Mandrake's View on United Linux
Mandrake doesn't plan on joining the United Linux
initiative, and here is why. It makes use of some Unix
history to point out why UL is a Bad Thing.


Public Disclosure and Apache
Public disclosure, or sometimes "responsible" disclosure is
a hot topic in security circles. If you find a vulnerability,
how long should you give the vendor to fix it before
disclosing details? In the Apache case, ISS decided that a
few hours was enough, which led to a chain of events ending
up in the Apache worm.


3) Linux Resources

TCP/IP Meets Chaos Theory
It's been long understood that if an operating system
doesn't randomize the TCP initial sequence number, then it
is vulnerable to a host of spoofing attacks. This paper
applies some chaos theory to the discussion; not only is it
informative, but there are some cool pictures!


Seven Common SSL Pitfalls
SSL is not only for the web--you can use the OpenSSL
libraries to protect client-server communications in almost
any application. There are many gotchas... this article
highlights the common ones.


Configuring GDM
This article takes you beyond some of the traditional settings
in the Gnome Display Manager, and shows you how you can
provide a couple of basic services to an X-Windows terminal
before the users log in. The article is quick to point out
that some of the things could lead to reduced security, but
it shows that your system can do something other than just
display a login window when no one is using it.


TCP/IP Troubleshooting
Figuring out the source of a network problem takes some
skill, and the ability to use some basic tools. Here is some
information on where to start.


Love it or hate it, EMACS is one of the more popular editors
out there. The key sequences make even vi look easy to use,
which is why this online tutorial will help you out.


4) App o' the Week
>From the more obscure side of the fence comes the
Controllable Regex Mutilator. It's basically a filter you
can use to categorize text by writing regular expressions,
except that it learns as it goes. Practical uses include
spam detection, or monitoring of logfiles.


(C) 2002 BrainBuzz.com, Inc. All Rights Reserved.

          This message is from CramSession

You are currently subscribed to the following list
   Hottest Linux News and Resources
   as: sean@ertw.com

To un-subscribe from this newsletter by e-mail,
   send a blank email message to:

To subscribe to this newsletter and many others visit
our site at: