Re: file permissions--something is changing it

From: Bryan Brock (bbrock_at_gmail.com)
Date: 12/21/04


Date: 21 Dec 2004 11:03:03 -0800

What are the exact permissions on /dev/ttyS0 and the kppp executable?
What's the group membership of the user? Can you use minicom to access
/dev/ttyS0?

If kppp is changing /dev/ttyS0, you should be able to use strace to see
the system calls kppp made to change the permissions or ownership of
the file (maybe chown32 or chmod32).

Try "strace -o strace.out kppp". This should run kppp and save the
stack trace output in strace.out. In another window, monitor the
system calls with "tail -f strace.out". You could also do an "ls -l
/dev/ttyS0" to note when the permissions have changed.

If you're not sure whether or not kppp is the culprit, you can use the
"-r" switch with the lsof command to monitor which program is opening
/dev/ttyS0.

To check for any processes that have opened /dev/ttyS0 once every
second, you can use the "-r 1" like this:

bbrock@queue:~> lsof -r 1 /dev/ttyS0
=======
=======
=======
=======
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
minicom 13413 bbrock 3u CHR 4,64 34953 /dev/ttyS0
=======
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
minicom 13413 bbrock 3u CHR 4,64 34953 /dev/ttyS0
=======
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
minicom 13413 bbrock 3u CHR 4,64 34953 /dev/ttyS0
=======
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
minicom 13413 bbrock 3u CHR 4,64 34953 /dev/ttyS0
=======
=======
=======
=======

bbrock@queue:~>



Relevant Pages

  • Re: file permissions--something is changing it
    ... What are the exact permissions on /dev/ttyS0 and the kppp executable? ... COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME ...
    (comp.unix.admin)
  • [SLE] question about file permissions
    ... I am using kppp for dialup, and it often complains ... So I thought I replace the link to kppp with a little ... The shell script is owned by root, ... I thought the above permissions would cause the script ...
    (SuSE)
  • Re: [SLE] (Revisited) Works in Windoze, NOT in SuSE!?!?!?!?!?!?
    ... That will set the correct permissions for pppd. ... I couldn't login into ... SuSE- when trying to boot into SuSE kept getting the message modprobe: ... And this also made me stop worrying about getting kppp to work :-). ...
    (SuSE)
  • Re: Using kppp as normal users
    ... I'm not using kppp - I use a boot script that runs pppd ... in 'demand' mode - hence there is no need for the bloated security hole. ... See if your distribution has a usrctrl mode. ... Change the permissions of the real kppp binary (probably in /usr/sbin, ...
    (comp.os.linux.questions)