Hardware manual

Using alternate names such as /dev/modem for /dev/ttyS2 may cause problems if one program opens
/dev/ttyS2 while another program opens /dev/modem. This problem was supposedly fixed around 2000, but is
still present in 2005. For dumb terminals, lockfiles are not used since this would not permit someone else to
send a message to your terminal using the write or talk program.
13.3 Change Owners, Groups, and/or Permissions of Device
Files
In order to use a device, you (or the program you run if you have "set user id") needs to have permission to
read and write the device "file" in the /dev directory. So a logical way to prevent others from using a device is
to make yourself the temporary owner of the device and set permissions so that no one else can use it. A
program may do this for you. A similar method can be used with the group of the device file.
While lock files prevent other process from using the device, changing device file owners/permissions
restricts other users (or the group) from using it. One case is where the group is permitted to write to the port,
but not to read from it. Writing to the port might just mean a message sent to a text-terminal while reading
means destructive reading. The original process that needs to read the data may find data missing if another
process has already read that data. Thus a read can do more harm that a write since a read causes loss of data
while a write only adds extra data. That's a reason to allow writes but not reads. This is exactly the opposite of
the case for ordinary files where you allow others to read the file but not write (modify) it. Use of a port
normally requires both read and write permissions.
A program that changes the device file attributes should undo these changes when it exits. But if the exit is
abnormal, then a device file may be left in such a condition that it gives the error "permission denied" when
one attempts to use it again.
14. Serial Communications Programs And Utilities
14.1 List of Software
Here is a list of some communication software you can choose from, available via FTP, if they didn't come
with your Linux distribution.
ecu - a communications program
C-Kermit - portable, scriptable, serial and TCP/IP communications including file transfer,
character-set translation, and zmodem support
gkermit Tiny GPLed kermit run only from the command line. Can't connect to another computer
gtkterm - a simple gtk terminal, X-based
minicom - telix-like communications program
picocom - like a small minicom but no automatic phone dialing
pppd - establishes a ppp connection on the serial line
seyon - X based communication program
xc - xcomm communication package
term and SLiRP offer TCP/IP functionality using a shell account.
screen is another multi-session program. This one behaves like the virtual consoles.
callback is where you dial out to a remote modem and then that modem hangs up and calls you
back (to save on phone bills).
mgetty+fax handles FAX stuff, and provides an alternate ps_getty.
Serial HOWTO
13.2 Lock-Files 55