home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / unix / question / 10811 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.5 KB

  1. Path: sparky!uunet!usc!sdd.hp.com!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Questions from a Novice
  5. Date: 8 Sep 1992 03:51:09 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 26
  8. Message-ID: <18h7vdINNkm8@early-bird.think.com>
  9. References: <1992Sep6.125339.21915@doug.cae.wisc.edu> <xxpnjvj.mzimmers@netcom.com>
  10. NNTP-Posting-Host: gandalf.think.com
  11.  
  12. In article <xxpnjvj.mzimmers@netcom.com> mzimmers@netcom.com (Michael Zimmers) writes:
  13. >1. Why is it that if I log in as one user, su to another, and then
  14. >run openwin, it won't log to the console window?  The specific error
  15. >message I get is 
  16. >   "System warning: Object 0x165d0, Permission denied, 
  17. >    ioctl TIOCCONS returned -1, attempt to make tty the console failed 
  18. >    (Tty package)"
  19.  
  20. When you login, the system sets the ownership of the terminal device
  21. (/dev/console, in this case) to you, so that you can perform operations
  22. that are restricted to the terminal's user (e.g. changing permissions, as
  23. is done by the mesg(1) command).
  24.  
  25. On the other hand, su(1) doesn't change ownership of the terminal.  The
  26. operation that redirects console I/O to a window (TIOCCONS) is another of
  27. the operations that's restricted to the owner (to prevent someone else from
  28. stealing your output).  So, when openwin tries to redirect console output,
  29. it gets a "Permission denied" error because you're not running as the
  30. console owner.
  31.  
  32.  
  33. -- 
  34. Barry Margolin
  35. System Manager, Thinking Machines Corp.
  36.  
  37. barmar@think.com          {uunet,harvard}!think!barmar
  38.