Subject: Re: tty permissions
To: Dante Profeta <profeta@neomedia.it>
From: Chad Mynhier <mynhier@cs.utk.edu>
List: netbsd-help
Date: 10/24/1996 09:48:28
Dante Profeta writes:
>I'm wondering about the behaviour of /dev/tty*
>
I can't answer all of your questions, but I think I can answer
some.
>Why there are some ttys permissions with crw-rw-rw (generally owned by
>root, but some others owned by users), and some others with crw-------
>permissions (owned only by users)?
What's happening here is that /bin/login (or something else)
is chowning the tty a user logs on to (or has an xterm on) to that user.
For instance, on the machine I'm currently logged into, there are the
following entries (among others):
crw--w---- 1 mynhier tty 20, 6 Oct 24 02:39 /dev/ttyp6
crw------- 1 mynhier tty 20, 8 Oct 24 09:40 /dev/ttyp8
They are both ttys that I own by way of xterms. One of these xterms
I did a 'mesg n' in, which explains why group tty can't write to it.
>
>What is the 'c' bit? I've no docs about it.
>
Well, you do have documentation on it, you just don't know where
to look. Try the man pages for ls and mknod. The SunOS man page (I'm
currently logged on to a SunOS machine) for ls says:
The mode printed under the -l option contains 10 characters
interpreted as follows. If the first character is:
d entry is a directory;
b entry is a block-type special file;
c entry is a character-type special file;
and other stuff. Just for curiosity's sake, you might also want to do
something like 'ls -l /dev/*sd0a'.
Chad Mynhier <mynhier@cs.utk.edu>
Lab Engineer, CS Department
University of Tennessee, Knoxville