[techtalk] X Display

Chris J/#6 sixie at nccnet.co.uk
Thu Dec 9 19:20:33 EST 1999

> I use XDM on my system. When I login and try to "su - localuser" in
> a xterm, I get the following message:
> /dev/ttypc: Operation not permitted

The 2nd part of your question seems to be answered by later mails - this 
first part however hasn't - but do not be alarmed, it's safe enough and can 
be ignored. It's caused simply because you're doing an su. When you logged in 
initially say, for example, as user "mary", the ownership if that terminal, 
ttypc, was set to mary.

When you su, the routines attempt to chown(2) the terminal to the user you 
have su'd to. As this is tried after su has setuid(2)'d down to the new user. 
Hence 'Operation not permitted'. The only time the chown(2) would work is if 
you su'd to root.

It's nothing to be worry you - the only commands it will affect are ones like 
'mesg', which will refuse to work. (mesg toggles the group write (sometimes 
the world write as well) permissions on the terminal device so you can 
recieve or refuse write(1)'s or talk(1)'s.

At least, that's as I understand it (it happens on Solaris 2.6 as well -- 
couldn't work it out -- this is what I finally decided it was :) It may be 
more than chown(2) - eg, ioctl's, chmod's or whatever - it's simply because 
it's changed user before it attempts to manipulate the terminal device).

I can't replciate the problem on my machine (Kernel 2.2.12; SuSE 6.2), so 
can't strace it to prove this. *If* I get the time at work (doubtful, yet 
possible), I can run su through truss on the Solaris boxes to confirm/deny 


@}-,'--------------------------------------------------  Chris Johnson --'-{@
    / "(it is) crucial that we learn the difference / sixie at nccnet.co.uk  \
   / between Sex and Gender. Therein lies the key  /                       \ 
  / to our freedom" -- LB                         / www.nccnet.co.uk/~sixie \ 

techtalk at linuxchix.org   http://www.linuxchix.org

More information about the Techtalk mailing list