LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File Inode Number Question (https://www.linuxquestions.org/questions/linux-newbie-8/file-inode-number-question-895955/)

benjam1nrk 08-06-2011 03:39 PM

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?

T3RM1NVT0R 08-06-2011 04:30 PM

@ 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.

devnull10 08-06-2011 04:59 PM

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


All times are GMT -5. The time now is 04:42 AM.