LinuxSA Mailing list archives

Index: [thread] [date] [subject] [author] [stats]
  From: Alan Kennington <akenning@topology.org>
  To  : LinuxSA <linuxsa@linuxsa.org.au>
  Date: Thu, 26 Apr 2001 18:37:54 +0930

how to diagnose a /dev/ttyS1 permission denied problem

Sorry to ask about something as uncool as a serial port, but
I've just bought an el whizzo UPS, which has a serial interface,
and I've got the right cable etc.

However, I get this:

========================================================
[root@fox nut]# apcsmart /dev/ttyS1
Network UPS Tools - APC Smart protocol driver 0.54 (0.44.3)
apcsmart: Unable to open (1) /dev/ttyS1: Permission denied  
========================================================

But when I look at the serial ports, I see this:

========================================================
[root@fox nut]# ls -l /dev/ttyS?
crw-r--r--   1 root     root       4,  64 May  6  1998 /dev/ttyS0
crwxr--r--   1 root     root       4,  65 Apr  8 09:33 /dev/ttyS1
crw-r--r--   1 root     root       4,  66 May  6  1998 /dev/ttyS2
crw-r--r--   1 root     root       4,  67 May  6  1998 /dev/ttyS3 
========================================================

In fact, I put the "x" on ttyS1 to see if it would change anything.

Now I'm pretty sure there's nothing using that port.

I've got a mouse on ttyS0.

What tools are open to me to find out what's holding on to that port,
if anything?

stty gives me this:

========================================================
[root@fox nut]# stty -a < /dev/ttyS1
speed 9600 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>; eol2 = <undef>; start = ^Q; stop = ^S; susp = ^Z;
rprnt = ^R; werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc -ixany -imaxbel
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke     
========================================================

This all looks very plain to me.
Whether I've got the cable plugged in oor not makes no difference.

Cheers,
Alan Kennington.

--------------------------------------------------------------------
    name: Dr. Alan Kennington
  e-mail: akenning@topology.org
 website: http://www.topology.org/
    city: Adelaide, South Australia
  coords: 34.88051 S, 138.59334 E
timezone: UTC+0930 http://www.topology.org/timezone.html
 pgp-key: http://www.topology.org/key_ak2.asc

-- 
LinuxSA WWW: http://www.linuxsa.org.au/  IRC: #linuxsa on irc.linux.org.au
To unsubscribe from the LinuxSA list:
  mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject


Index: [thread] [date] [subject] [author] [stats]
Return to the LinuxSA Mailing List Information Page