* Preventing log file deletion
@ 2009-10-07 14:05 catrefil
2009-10-07 18:06 ` Kari Uusimäki
2009-10-07 22:50 ` Bob Harris
0 siblings, 2 replies; 5+ messages in thread
From: catrefil @ 2009-10-07 14:05 UTC (permalink / raw)
Hi,
I'm trying to prevent log file from being deleted.
Would anybody already have implemented something like that? or have
any idea on how to do it?
Thanks
P.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing log file deletion
2009-10-07 14:05 Preventing log file deletion catrefil
@ 2009-10-07 18:06 ` Kari Uusimäki
2009-10-09 13:42 ` catrefil
2009-10-07 22:50 ` Bob Harris
1 sibling, 1 reply; 5+ messages in thread
From: Kari Uusimäki @ 2009-10-07 18:06 UTC (permalink / raw)
catrefil wrote:
> Hi,
>
> I'm trying to prevent log file from being deleted.
> Would anybody already have implemented something like that? or have
> any idea on how to do it?
>
> Thanks
>
> P.
The information you told is very limited. Could you please describe your
problem more thorough so it would be better to understand what you want
to accomplish?
Which log do you mean? In which situation does it become deleted?
Kari
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing log file deletion
2009-10-07 14:05 Preventing log file deletion catrefil
2009-10-07 18:06 ` Kari Uusimäki
@ 2009-10-07 22:50 ` Bob Harris
2009-10-09 13:32 ` catrefil
1 sibling, 1 reply; 5+ messages in thread
From: Bob Harris @ 2009-10-07 22:50 UTC (permalink / raw)
In article
<2b8a7669-aa3d-4df5-aad3-9d3d2a26787d@31g2000vbf.googlegroups.com>
,
catrefil <plabrosse@gmail.com> wrote:
> Hi,
>
> I'm trying to prevent log file from being deleted.
> Would anybody already have implemented something like that? or have
> any idea on how to do it?
>
> Thanks
>
> P.
Create a hardlink to the file. As long as there is a directory
pointing at the file, it will not be deleted, on the other
directory entry.
ln file.log /some/other/directory/file.log
Notice there is NO -s in that 'ln' command. You want a hardlink,
not a symlink.
Of course if the file is not really deleted, but rather truncated
instead, that would be a different storey.
Bob Harris
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing log file deletion
2009-10-07 22:50 ` Bob Harris
@ 2009-10-09 13:32 ` catrefil
0 siblings, 0 replies; 5+ messages in thread
From: catrefil @ 2009-10-09 13:32 UTC (permalink / raw)
On 7 oct, 18:50, Bob Harris <nospam.News....@remove.Smith-Harris.us>
wrote:
> In article
> <2b8a7669-aa3d-4df5-aad3-9d3d2a267...@31g2000vbf.googlegroups.com>
> ,
>
> catrefil <plabro...@gmail.com> wrote:
> > Hi,
>
> > I'm trying to prevent log file from being deleted.
> > Would anybody already have implemented something like that? or have
> > any idea on how to do it?
>
> > Thanks
>
> > P.
>
> Create a hardlink to the file. As long as there is a directory
> pointing at the file, it will not be deleted, on the other
> directory entry.
>
> ln file.log /some/other/directory/file.log
>
> Notice there is NO -s in that 'ln' command. You want a hardlink,
> not a symlink.
>
> Of course if the file is not really deleted, but rather truncated
> instead, that would be a different storey.
>
> Bob Harris
That's a great idea Bob - I'm going to give it a try
Thanks
Philippe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Preventing log file deletion
2009-10-07 18:06 ` Kari Uusimäki
@ 2009-10-09 13:42 ` catrefil
0 siblings, 0 replies; 5+ messages in thread
From: catrefil @ 2009-10-09 13:42 UTC (permalink / raw)
On 7 oct, 14:06, Kari Uusimäki <uusim...@exdecWITHOUTTHISfinland.org>
wrote:
> catrefil wrote:
> > Hi,
>
> > I'm trying to prevent log file from being deleted.
> > Would anybody already have implemented something like that? or have
> > any idea on how to do it?
>
> > Thanks
>
> > P.
>
> The information you told is very limited. Could you please describe your
> problem more thorough so it would be better to understand what you want
> to accomplish?
>
> Which log do you mean? In which situation does it become deleted?
>
> Kari
any log really but say /var/adm/messages
If somebody accidentally or intentionally deletes it. I'm trying to do
this as part of my hardening. The idead is If the log file cannot get
deleted then I'll always know what happened
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-10-09 13:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-07 14:05 Preventing log file deletion catrefil
2009-10-07 18:06 ` Kari Uusimäki
2009-10-09 13:42 ` catrefil
2009-10-07 22:50 ` Bob Harris
2009-10-09 13:32 ` catrefil
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox