LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-06-2008, 03:39 AM   #1
linuxdoniv
Member
 
Registered: Mar 2008
Posts: 63

Rep: Reputation: 15
Attributes of the file which can not be overwritten


Hi ,

I now know that the attributes of the file such as last write time last access time etc which sit in the struct stat for a file can be overwritten.

What are the attributes which can not be overwritten and if overwritten by malicious module, we can know that its overwritten.

Thanks for any input...
 
Old 08-06-2008, 04:05 AM   #2
linuxdoniv
Member
 
Registered: Mar 2008
Posts: 63

Original Poster
Rep: Reputation: 15
I mean to say,

What are the attributes of a file ,which, if changed would spoil the integrity of the file.

Say a user writes some thing to the file but modifies the last write time, but still the file is valid when we try to read the file and we cant perform any cross check to find this out.

are there any attributes for which such kind of cross check can be made.

sorry for again posting...

Thanks for any help...
 
Old 08-06-2008, 04:32 AM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Nothing that I know of.
 
Old 08-06-2008, 05:38 AM   #4
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
What about the link count?
 
Old 08-06-2008, 11:55 AM   #5
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Link count does not have anything to do with the integrity of a file.
 
Old 08-06-2008, 08:11 PM   #6
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
I'd think that invalidity would speak for itself. If you don't want a file that's all null characters, then finding one would be a faulty file. If it doesn't matter, then it's obviously of no concern. I suppose if you had a modification date of "100 March -256" that would be out of the ordinary, but I don't know if file times utilize all bits. That depends on the file system, I'm sure.

A bad link count would be a file system error, as I suppose an "invalidated" file would be. Normally fsck corrects that sort of thing. I guess changing the file's size to something that it isn't would be another way. Again, this all has to do with the file system itself, as the only way to truly corrupt a file is to alter the data it contains.
ta0kira
 
Old 08-07-2008, 12:51 AM   #7
burschik
Member
 
Registered: Jul 2008
Posts: 159

Rep: Reputation: 31
Quote:
Originally Posted by Mr. C. View Post
Link count does not have anything to do with the integrity of a file.
Very true. But none if the information in the inode has anything to do with file integrity. Hence, I had somehow assumed the OP was talking about the inode's integrity.
 
  


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
Can I use file attributes with ReiserFS HGeneAnthony Linux - Security 4 05-01-2006 07:05 AM
fstab file being overwritten MacLin Fedora 3 07-26-2004 01:25 PM
uploaded file on vsftpd has wrong file attributes rune.kg Linux - Newbie 2 03-06-2004 09:23 AM
file attributes binky22 Linux - Newbie 2 09-26-2003 04:17 PM
Changing file attributes from C sourceman Linux - General 3 04-23-2002 07:37 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:22 AM.

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