LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2011, 04:39 PM   #1
benjam1nrk
LQ Newbie
 
Registered: Mar 2010
Distribution: CentOS
Posts: 24

Rep: Reputation: 1
File Inode Number Question


I am in the process of implementing a licensing system for my software product, as to restrict a certain license to a specified server, which would need to validate the server by its MAC address etc..

One suggestion I received is to validate the server by the inodes of certain designated files.

Are there any common *nix files that would have an unchanging inode number, regardless of os updates etc?
 
Old 08-06-2011, 05:30 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi there,

Quote:
Are there any common *nix files that would have an unchanging inode number, regardless of os updates etc?
When you say OS updates does that mean package updates like ftp, http, samba packages? If you are talking about package updates then yes inode number will remain the same as I don't think so updates will be touching system's NIC configuration file. Even if they are making changes to NIC configuration file the inode number will remain the same until and unless they are moved somewhere and then put it back.

If you are taking about upgrade then I doubt that it will be possible. For example when we talk about upgrade we are talking about upgrading RHEL5 server to RHEL6. The only way to do that, that I am aware of is to either setup a new box and then transfer your files over to it or you can take a backup of existing server and then restore the files from back. Now inode number depends upon filesystem i.e. how it is formatted was there any specific settings used during formatting etc. Even if you copy a file from one location to another the inode number will change even when you move/copy the file within the same partition.

Inode number is used to uniquely identify a file on the file system and it contains an inode table which has the information about the file metadata or you can say data attributes.

I will give you another example. I installed two systems with exact same configuration but still inode number of files are different because inode number is automatically assigned to a file by the system. So upgrade will definitely affect inode number unless you are not touching the file and keeping on the same filesystem.
 
Old 08-06-2011, 05:59 PM   #3
devnull10
Member
 
Registered: Jan 2010
Location: Lancashire
Distribution: Slackware Stable
Posts: 548

Rep: Reputation: 116Reputation: 116
If you are going down that route, why not just create a file and use that?
 
  


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
opening a file using its inode number... rohanak Linux - General 1 03-09-2008 07:27 AM
opening a file using its inode number rohanak Linux - General 2 03-09-2008 07:25 AM
Getting file name from inode number kalamaraki Programming 5 02-24-2007 10:17 PM
accessing file using inode number namusin Linux - Kernel 1 01-30-2007 07:31 PM
access file using inode number? allasso Linux - General 1 09-26-2006 10:14 PM


All times are GMT -5. The time now is 03:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration