file permissions--something is changing it
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix administration > file permissions--something is changing it




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    file permissions--something is changing it  
ilaboo


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 07:54 AM

using kppp debian periodically something is changing permissions of
dev/ttys0 to all forbidden

i hve to periodically as root change them to all a  +rw

how can i monitor whatever is chaging this files permissions?

tia
peter





[ Post a follow-up to this message ]



    Re: file permissions--something is changing it  
Jean-Philippe Blais


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10:56 PM

ilaboo wrote:

> using kppp debian periodically something is changing permissions of
> dev/ttys0 to all forbidden
>
> i hve to periodically as root change them to all a  +rw
>
> how can i monitor whatever is chaging this files permissions?
>
> tia
> peter

Give a try with FAM (file access monitor).

JP.





[ Post a follow-up to this message ]



    Re: file permissions--something is changing it  
Jean-Philippe Blais


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10:56 PM

Jean-Philippe Blais wrote:

> ilaboo wrote:
> 
>
> Give a try with FAM (file access monitor).
>
> JP.

Oups it is not file access monitor but File Alteration Monitor.

JP.





[ Post a follow-up to this message ]



    Re: file permissions--something is changing it  
Bryan Brock


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10:56 PM

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:~>






[ Post a follow-up to this message ]



    Re: file permissions--something is changing it  
Bryan Brock


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
12-21-04 10:56 PM

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:~>






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:10 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register