LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-20-2012, 04:18 AM   #1
bolaoi
LQ Newbie
 
Registered: Sep 2007
Posts: 8

Rep: Reputation: 0
howto find what caused directory metadata to change


I recently noticed that a direcory's inode changed "by itself"
At least, the inode changed.
I noticed it when I rsynced my files to another box.

I wish to find out exactly what changed.
Using ls -l, I can see when the change occurred.

I have tried looking for hidden files in the directory, and running
chkrootkit and rkhunter.
In summary,
how can I find out exactly what changed in the inode?

what find command can I use to locate recently changed files and directories?

John
 
Old 06-21-2012, 04:01 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
File inodes change when file contents are modified (think "$EDITOR file open, edit, save", not "$>/file; echo hello > file") but a directory inode doesn't change when directory contents are modified or the directory inode itself is modified (ownership, access rights). Also if there's not much writing done a changed files inode number number may increment and be close to the previous one. If a root directory like "/sbin" is changed (rmdir, mkdir) then on a system that's been in use for a while the new directory inode number won't even be close to the old one. Before I go on I'd like to ask what exact directory name (full path please) was changed?
 
Old 06-21-2012, 06:38 AM   #3
bolaoi
LQ Newbie
 
Registered: Sep 2007
Posts: 8

Original Poster
Rep: Reputation: 0
The directory that was changed was one which is a subdir of my Documents directory which is a subdir of my home directory.
It was not anything like /bin, /sbin, /etc, /usr etc.

There is probably a logical explanation.
I would like to find out what changed and why.
No new files were created and no file was accessed in the directory at the time of the inode change. I wasn't even using the laptop at the time of the change.
 
Old 06-22-2012, 10:04 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by bolaoi View Post
I wasn't even using the laptop at the time of the change.
That may mean 0) you were logged on but you were not actively using the machine at that specific time, or it may mean 1) the machine was running but you were not logged in or it may mean 2) the machine was powered down. In the case of #0 and #1 the system might have run any automated tasks like custom tmpwatch or cron jobs or cleanup or backup and in the case of #0 a (any) user might be running any applications or scripts. In the case of #0 and #1 one should also consider the machine being connected to a network and or physically left unattended. As you can see what seems like a simple sentence may unfortunately be interpreted in different ways if you have an eye for it.


Quote:
Originally Posted by bolaoi View Post
I would like to find out what changed and why. No new files were created and no file was accessed in the directory at the time of the inode change.
To find out you would have to take the time frame in which the change could have happened as scope, gather file system access and modification time stamps, log file contents, login database records and shell history. What you'll find from trying to put the pieces back in the puzzle so to speak is that Linux doesn't have verbose and all-encompassing logging enabled by default. Sure it can be made to but that's another chapter.
 
  


Reply



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
[SOLVED] What would change a Files Metadata 2w!st3d Linux - General 4 04-13-2012 01:31 PM
[SOLVED] Howto find installation directory for FlightGear -- can't be too hard, surely? pierssnell Linux - Newbie 3 10-28-2011 06:32 PM
Extremely Large Metadata size for directory on an ext4 filesystem mdpolaris Linux - Server 2 06-27-2011 04:47 AM
Kernel Update Caused Panic, Howto Downgrade hategiants Linux - Software 6 04-22-2006 07:10 PM
Howto fix wget caused segfaultss? suguru Linux - Software 2 10-12-2005 12:57 PM

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

All times are GMT -5. The time now is 03:29 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