LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 02-03-2010, 03:35 PM   #1
ramyayella
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Rep: Reputation: 0
Question How to add new attribute to the inode structure


In my project, there is a requirement for adding one more attribute for file properties which keeps track of previous file copies(Copy history).
So how can we accomplish this?
can we add/store this information in inode structure?
please help me out
thanks in advance.
 
Old 02-03-2010, 06:28 PM   #2
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
The responsibility for copying files happens at the application level, so it doesn't make sense to have the copy log information at the file system level.

If this requirement applies to only a single application, then you have to be creative about different ways in which you might keep track of file copies. It could be a database, or a hidden file associated with each data file, or meta data stored in the file itself.

It also depends on the purpose of the copy history; whether it is for security reasons, for documentation, or whatever (ie, the specification is vague).

Last edited by neonsignal; 02-03-2010 at 06:32 PM.
 
Old 02-04-2010, 12:09 AM   #3
ramyayella
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Question

the main intension of this application is to detect plagiarism. When any A file content is copied to some B file then in the B file we must have information that it is copied from A. I am not yet sure about the implementation like whether a database or log file or in file properties itself. can u please suggest which would be the best way. And i was going through FUSE, how feasible it is to use fuse for my project. Please help me out as i am a beginner in Linux.

Thanks in advance
 
Old 02-04-2010, 12:43 AM   #4
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
My point is that if a file is readable, then it can be copied. Even the cp copy program simply opens the file and copies the contents; this is not done by the file system. File systems just provide the means of reading and writing to files.

You could log every open of a file, but this can only tell you that the file was read, not where it was copied to.

If you have control over the application(s) that opens the file, then that is where the logging must be done.

In some commercial settings, digital signatures are used on files to assert authorship. However, this is in the context of non-repudiation of authorship, not of plagiarism (eg signing off test results).

You still need to think more about exactly what you are trying to achieve. Imagine that the contents of the files were on paper sheets, and that everyone owned a photocopier. How would you keep track of paper copies? In this analogy, the filing cabinet is the file system, and the photocopiers are the applications. Think about the design before worrying about how to implement it on a particular operating system.

Last edited by neonsignal; 02-04-2010 at 12:44 AM.
 
Old 02-04-2010, 02:14 AM   #5
ramyayella
LQ Newbie
 
Registered: Feb 2010
Posts: 7

Original Poster
Rep: Reputation: 0
Question

Our intention is to avoid file to file plagiarism, here paper or hardcopy don't come into picture. But in the initial stages what we wanted to do is keep track of cp command i.e, whenever cp command is used on a file the information about the source file(copied) is stored in the inode structure of the copying file. In file properties of every we want to provide an additional attribute called "Log" or "history" which gives the previously stored details.

So, we thought of writing some kernel procedure to store information about the copied file and call the procedure from cp command. Is this the correct approach if initially we concentrate on only cp command.
 
Old 02-04-2010, 04:33 AM   #6
neonsignal
Senior Member
 
Registered: Jan 2005
Location: Melbourne, Australia
Distribution: Debian Buster (Fluxbox WM)
Posts: 1,390
Blog Entries: 52

Rep: Reputation: 359Reputation: 359Reputation: 359Reputation: 359
The paper example was just to get you thinking about design, by thinking about an analogous process.

You could modify the cp command (ie, create your own cp with some logging code). But there doesn't seem to be any good reason to store the log/history from inside the file system; why not just log it to a database?

Anyway there is no simple way to comprehensively monitor copying; you'd have to modify at least half the commands in the system - there are dozens if not hundreds of different ways of doing a copy. And there is nothing to stop a person using their own (unmodified) version of cp.

The design comes down to a number of factors:
* will users (maliciously) want to change the log?
* can the files be viewed by any user?
* how much control do you have over the applications that the user has access to? (for example, do they have shell access)
* does a modified version of a file count as plagiarism?
* will users ever become aware that the copying is being logged?
* what is the nature of the data being copied?
* are you wanting to monitor copying, or to figure out which copy was original?
* does a link to the original count as a copy?
and so on; that's just a few questions off the top of my head

The problem in the digital domain is that information can be very easily copied, and copied perfectly. The only thing you need in order to make a copy is to be able to view the data, but there is no magical connection between the source and the copy. So it is possible to log viewings of a file, but impossible to know if a copy of the view was made without radically controlling every tool that might be used to make a copy.

Last edited by neonsignal; 02-04-2010 at 04:36 AM.
 
  


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
Symbolic linking and inode structure tintintin Linux - General 0 01-21-2008 04:32 PM
Inode file_lock structure sid18 Linux - Kernel 0 09-09-2007 12:13 AM
adding flag in inode structure vishalbutte Programming 6 01-25-2006 01:24 PM
Information needed about the use of the reserved field in the inode structure calsoft_pg Linux - Software 1 12-23-2005 10:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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