Directory is Same but Checksum is different

Hello,

I am performing a checksum on our software we have installed on a unix solaris 2.0 os.

If the checksum generated report is not the same as a 'Gold' report we have on disk. Then our software is deleted, and reinstalled.

The problem I am having is if you run the program again, the checksum report is still different from the gold_report.

And on different machines we get different checksum's for identical directories.!!!

Does anyone know why this is?

any help would be appreciated,
Justin

Please clarify what you mean by "getting a checksum" for a directory and what an "identical directory" is supposed to be. If you are literally running checksum on a directory, and then comparing that value to another checksum on another directory, I would not expect them to match. Two directories in the same filesystem, each having hard links to the same exact files have a shot at matching checksums. But even these may not be identically structured.

Cheers for the reply. What I am doing is running 'sum' on software on a unix machine and placing the checksums into a file.

Running a 'diff' command on the generated file and a 'gold' file

If these are different, then delete all the software and reinstall.

If I then run check sums again, it finds differences again (even though the install generated the 'gold' file).

One thing i have discovered is:
These are on empty directories. Is it because of the metadata that directories hold?

thanks,

I don't know what running "sum on software" means. I don't know what item is being compared to what other item. Are there even two items involved? Are you running sum on an item and later running sum again on the same item?

Because you are running sum on an empty directory, it is clear that you are actually using the directory as input. (As opposed to running sum on the contents of the directory.)

You say "Then our software is deleted, and reinstalled.". You do this because you're not happy with the sum on an empty directory?

A directory entry is a name and an inode number. A directory has many of these. A directory entry is deleted by clobbered the beginning of the name. Directories grow but do not shrink. Two empty directories may be of different sizes. And they may have differents shards of deleted entries laying around. Now put two identical entries in each directory. You may overlay the only differing shard. Or you may still have seemingly identical directories with differing sums.

Because of the tree structure of a file system, there is no legal way to create two identical directories although it can be done through trickery. So I still have no clue as to what you are doing. :confused: