Operating System - HP-UX
1833978 Members
2003 Online
110063 Solutions
New Discussion

Log of files coming and going out

 
Hunki
Super Advisor

Log of files coming and going out

We have this interface between which we exchange files such that files that come in are being created and files that go out are being deleted from our system, is there a way to actually get notified about the files creation and deletion on the OS level or more so on the filesystem level.

Thanks,

Hunki
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: Log of files coming and going out

Hi Hunki:

If by "files that come in...and files that go out..." you mean via FTP, then you can setup rather detailed logging of FTP events.

Have a look at the manpages for 'ftpaccess(4)' and the 'xferlog(5)' along with 'ftpd(1M)'

http://docs.hp.com/en/B2355-60127/ftpaccess.4.html

http://docs.hp.com/en/B2355-60127/xferlog.5.html

http://docs.hp.com/en/B2355-60127/ftpd.1M.html

Regards!

...JRF...

A. Clay Stephenson
Acclaimed Contributor

Re: Log of files coming and going out

There is nothing "built-in" that does this although some add-ons like tripwire can be configured to do much of this. This really is a task that your application should be doing. Whatever processe removes the files should easily be able to log that action and also note the presence of any files that weren't in the directory(ies) as the time of the last removal. You should note that UNIX has no concept of when a file was created it; if you know this, you only know it by accident.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Log of files coming and going out

There is nothing "built-in" that does this although some add-ons like tripwire can be configured to do much of this. This really is a task that your application should be doing. Whatever process removes the files should easily be able to log that action and also note the presence of any files that weren't in the directory(ies) as the time of the last removal. You should note that UNIX has no concept of when a file was created it; if you know this, you only know it by accident.
If it ain't broke, I can fix that.
Jeff Schussele
Honored Contributor

Re: Log of files coming and going out

Hi Hunki,

How exactly are these files coming in/out - ftp, rcp, scp or some sort of executable?
You may need to resort to auditing to know for sure if an executable is using system calls to do this.
Otherwise enhanced inetd, ftpd, sshd logging can tell you in case of the formers.

HTH,
Jeff

PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Shahul
Esteemed Contributor

Re: Log of files coming and going out

Hi,

File can come many ways, for eg, ftp, rcp, scp, etc. It's much more easy to log the file arrival from these methods. ftp and scp you can log. rcp, I am not sure, you may need to create your own script, then it can be logged.

I have not found anything inbuilt to log file removal, you may need to create self script for it.

Regards
Shahul