kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* how to detect a user who changed a particular file in Linux.
@ 2011-05-16  9:32 V.Ravikumar
  2011-05-16 10:42 ` Neependra Khare
  2011-05-16 14:15 ` Greg KH
  0 siblings, 2 replies; 5+ messages in thread
From: V.Ravikumar @ 2011-05-16  9:32 UTC (permalink / raw)
  To: kernelnewbies

Hi all,

(Note : I'm writing this mail to this kernel group as I did not find any
suitable mechanism in application level for my below need).

If a  file modified by some user then how can we detect that user who
modified it.

Linux audit was not suitable for my need.

Can this be achieved through kernel driver/module.

Any other suggestions/help would be welcome.

Thanks in advance.

Regards,
Ravikumar.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110516/9580963e/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how to detect a user who changed a particular file in Linux.
  2011-05-16  9:32 how to detect a user who changed a particular file in Linux V.Ravikumar
@ 2011-05-16 10:42 ` Neependra Khare
  2011-05-16 14:15 ` Greg KH
  1 sibling, 0 replies; 5+ messages in thread
From: Neependra Khare @ 2011-05-16 10:42 UTC (permalink / raw)
  To: kernelnewbies

On Mon, May 16, 2011 at 3:02 PM, V.Ravikumar
<ravikumar.vallabhu@gmail.com>wrote:

>
> If a  file modified by some user then how can we detect that user who
> modified it.
>

SystemTap can help you. Have a look at following examples:-
http://sourceware.org/systemtap/wiki/WSFileMonitor
http://sourceware.org/systemtap/wiki/WSFileMonitor2

-- 
Regards,
Neependra
www.neependra.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110516/61492c3a/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how to detect a user who changed a particular file in Linux.
  2011-05-16  9:32 how to detect a user who changed a particular file in Linux V.Ravikumar
  2011-05-16 10:42 ` Neependra Khare
@ 2011-05-16 14:15 ` Greg KH
  2011-05-17 10:31   ` V.Ravikumar
  1 sibling, 1 reply; 5+ messages in thread
From: Greg KH @ 2011-05-16 14:15 UTC (permalink / raw)
  To: kernelnewbies

On Mon, May 16, 2011 at 03:02:10PM +0530, V.Ravikumar wrote:
> 
> Hi all,
> 
> (Note : I'm writing this mail to this kernel group as I did not find any
> suitable mechanism in application level for my below need).
> 
> If a? file modified by some user then how can we detect that user who modified
> it.
> 
> Linux audit was not suitable for my need.

Why not?  It should have showed you this exactly.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how to detect a user who changed a particular file in Linux.
  2011-05-16 14:15 ` Greg KH
@ 2011-05-17 10:31   ` V.Ravikumar
  2011-05-17 11:05     ` Nuno Martins
  0 siblings, 1 reply; 5+ messages in thread
From: V.Ravikumar @ 2011-05-17 10:31 UTC (permalink / raw)
  To: kernelnewbies

On Mon, May 16, 2011 at 7:45 PM, Greg KH <greg@kroah.com> wrote:

> On Mon, May 16, 2011 at 03:02:10PM +0530, V.Ravikumar wrote:
> >
> > Hi all,
> >
> > (Note : I'm writing this mail to this kernel group as I did not find any
> > suitable mechanism in application level for my below need).
> >
> > If a  file modified by some user then how can we detect that user who
> modified
> > it.
> >
> > Linux audit was not suitable for my need.
>
> Why not?  It should have showed you this exactly.
>
>
For my need, I have to asynchronously notify  if a given file was modified
by some user using some program.

As per my understanding for audit , one has to update system specific audit
configuration files(say using some auditd related command line tools) with
given  file and it is not suitable for my requirement.

Is there any other ways apart from using SystemTap and auditd command line
tools.

Thanks for all your suggestions so far.

Regards,
Ravikumar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110517/8b751173/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* how to detect a user who changed a particular file in Linux.
  2011-05-17 10:31   ` V.Ravikumar
@ 2011-05-17 11:05     ` Nuno Martins
  0 siblings, 0 replies; 5+ messages in thread
From: Nuno Martins @ 2011-05-17 11:05 UTC (permalink / raw)
  To: kernelnewbies

On Tue, May 17, 2011 at 11:31 AM, V.Ravikumar
<ravikumar.vallabhu@gmail.com> wrote:
>
>
> On Mon, May 16, 2011 at 7:45 PM, Greg KH <greg@kroah.com> wrote:
>>
>> On Mon, May 16, 2011 at 03:02:10PM +0530, V.Ravikumar wrote:
>> >
>> > Hi all,
>> >
>> > (Note : I'm writing this mail to this kernel group as I did not find any
>> > suitable mechanism in application level for my below need).
>> >
>> > If a? file modified by some user then how can we detect that user who modified
>> > it.
>> >
>> > Linux audit was not suitable for my need.
>>
>> Why not? ?It should have showed you this exactly.
>>
>
> For my need, I have to asynchronously notify? if a given file was modified by some user using some program.
>
> As per my understanding for audit , one has to update system specific audit configuration files(say using some auditd related command line tools) with given? file and it is not suitable for my requirement.
>
> Is there any other ways apart from using SystemTap and auditd command line tools.
>
> Thanks for all your suggestions so far.

Have you considered using KProbes or tracepoints ?
For KProbes you do write some kernel module to monitor the function
you want. You have to be carefull not to try to monitor inlined
functions.
You could try to combine the use of KProbes with KThreads or
usermode-helper process.

It is just a thought.


>
> Regards,
> Ravikumar
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
--
Nuno Martins

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-05-17 11:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-16  9:32 how to detect a user who changed a particular file in Linux V.Ravikumar
2011-05-16 10:42 ` Neependra Khare
2011-05-16 14:15 ` Greg KH
2011-05-17 10:31   ` V.Ravikumar
2011-05-17 11:05     ` Nuno Martins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).