LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-24-2006, 08:58 AM   #1
gshafik@optusnet.com
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Rep: Reputation: 0
Unhappy track file access on linux


Hi All,
*
Currently we are using Samba to access our share point on Linux server via a
windows workgroup. SELinux is enabled and everything works fine.
*
What I would like is a log file of all the files accessed. If the log file
logs IP address, user and application that would be great however just a log
of which files where access and a date/time stamp would be ample.
*
*I've searched all over the net and can't find a simple "How To" using SELinux
to allow for logging all file activity, in fact I can't find anything.
*
*Many thanks for any help anyone is able to offer. I'm absolutely sure someone
has tackled this issue and it may be as simple as starting up the right
service.
*
*Version of Linux Fedora Core 5 straight out the box.
*
*Regards,
*George Shafik
 
Old 09-24-2006, 09:17 AM   #2
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Code:
b0uncer[~]$ whatis lsof
lsof                 (8)  - list open files
b0uncer[~]$
..that explains one possible way. Though I'm not saying it's practical in any way for a long period watching, but..that's a start. lsof shows which files are open, read
Code:
man lsof
for more information.

p.S. I'm sure somebody has a way better way..
 
Old 09-24-2006, 10:38 AM   #3
abegetchell
Member
 
Registered: Mar 2006
Distribution: RHEL, Fedora, Ubuntu
Posts: 32

Rep: Reputation: 15
I don't know how to do this with SELinux, but you can try something like this for a more portable version that won't give you username/IP addresses information:

find /samba/share/point -mtime 0 -print0 | xargs -0 ls -al > access_log

This will give you a list of all files modified in the past 24 hours. Check out the man pages for find to see all of the options for time and date ranges if you would rather keep logs every hour, every three hours, etc.
 
Old 09-25-2006, 12:55 AM   #4
gshafik@optusnet.com
LQ Newbie
 
Registered: Sep 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Many thanks "abegetchell" this will do the job.

Thanks for the quick response it is greatly appreciated.

Kind Regards,
George Shafik
 
  


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
How can i share file in linux and access it in other linux machine winxandlinx Linux - Networking 3 08-03-2006 06:11 AM
Track File modification dhammika Programming 1 11-25-2005 07:03 AM
How to seperate an audio track from a video file? anindyanuri Linux - Software 2 09-16-2005 01:02 PM
File Access Windows From Linux inescapeableus Linux - Networking 1 06-18-2005 02:14 PM
win98 file access at linux eye Red Hat 2 10-19-2003 08:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:16 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
Open Source Consulting | Domain Registration