LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-16-2003, 08:23 AM   #1
EdwinNameless
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: Mandrake 10.1
Posts: 8

Rep: Reputation: 0
Question Tracking the accessed files


First of all, hello everyone since I'm quite new in here.

I would like to know if there is any facility provided by linux in order to track down which files have been accessed by a running program. I have indeed a problem with a piece of software and I suspect a permission problem; however, I don't quite know what files to look at... A facility tracking those files would be a great help. Have you ever heard of any?
 
Old 07-16-2003, 09:57 AM   #2
rch
Member
 
Registered: Feb 2003
Location: Santa Clara,CA
Distribution: Mandriva
Posts: 909

Rep: Reputation: 48
Hi EdwinNameless
Are you french?
Well first of all what do you mean?Do you want a count of how many times a file has been accessed or something else?
Could you elaborate on the 'permission' problem you think you have?
Robin
(sorry I am not supposed to ask your nationality but I kinda like france,I had a great friend from there,she was wonderful,maybe some mod will kick me out!)

Last edited by rch; 07-16-2003 at 09:59 AM.
 
Old 07-16-2003, 11:13 AM   #3
m0rl0ck
Member
 
Registered: Nov 2002
Distribution: A totally 133t distro :)
Posts: 358

Rep: Reputation: 31
have you tried lsof?

DESCRIPTION
Lsof revision 4.64 lists information about files opened by processes
for the following UNIX dialects:



lsof|grep appname

should do it
 
Old 07-16-2003, 11:18 AM   #4
royss
LQ Newbie
 
Registered: Jul 2003
Posts: 8

Rep: Reputation: 0
If the program fails right after it started you can use strace.
You can see all open and closes on files.
use it as :

strace program


Greets

Royss
 
Old 07-16-2003, 11:27 AM   #5
EdwinNameless
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: Mandrake 10.1
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by rch
Hi EdwinNameless
Are you french?
Half French indeed.

Quote:
Well first of all what do you mean?Do you want a count of how many times a file has been accessed or something else?
No, I'd like to know which files a program has tried to gain access to, even those for which it didn't have permissions to do so. Something like:
Code:
find / -amin 2
which would also display the files for which the permissions are denied.

I have set up Cyrus imap using pam but when I run imtest to connect onto imap, the message I get clearly shows one of the files does not have the proper permission rights. Since the error message is not quite clear and does not say who the culprit is, I am trying to find a way to know what the heck that file might be...
 
Old 07-16-2003, 12:00 PM   #6
EdwinNameless
LQ Newbie
 
Registered: Jul 2003
Location: Paris
Distribution: Mandrake 10.1
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
strace program
Geez, didn't know that one: it's brilliant! How to solve a one-day long problem in one command...

It still doesn't work for some other reasons but at least you gave me an excellent answer to my question. Thanks Royss. Thanks to m0rl0ck and rch for their help too.

Regards.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Logs of accessed sites per IP in NAT jeffvph Linux - Networking 1 12-04-2005 08:35 PM
rsync files accessed under 30 days 0ddba11 Linux - General 3 11-03-2005 07:59 AM
Same permissions on two files, but only one can be accessed by web server? murr4y Linux - Software 5 06-14-2005 03:59 AM
recent attack via phpBB, log files deleted? accessed file system outside /home/ enzo250gto Linux - Security 8 12-17-2004 02:51 PM
Why is my HDD accessed non-stop??? Apollo77 Linux - General 15 03-06-2003 03:43 AM


All times are GMT -5. The time now is 12:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration