Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There are plenty of articles on the web detailing why you might not want to use Apache's default inode-mtime-size format for ETags (see e.g. here or here). All such articles recommend the same thing: remove inodes from your ETags.

But I have yet to read anything on what might have motivated the inclusion of inode for Apache in the first place. On the face of it, it only seems useful if one needs to be able to differentiate between octet-for-octet facsimiles of the same resource, but this is surely counter to the very purpose of ETags.

Apache's authors are not known for their sloppy handing of internet standards, so I feel I must be missing something. Can anyone elaborate?

share|improve this question
up vote 2 down vote accepted

I expect it is to differentiate resources that are the same size and the have the same mtime, but aren't actually the same file. This would be easy to do -- say you've got two files with different contents but the same size (not that hard) and the same mtime (trickier, but if you copied a directory tree from somewhere else, still not hard), a and b, and you're serving a through Apache. Now mv b a and while the inode changes for a, the size and mtime don't -- and you're up the creek without an inode.

share|improve this answer
ETags can only meaningfully be compared between revisions of a single resource, but moving a file from A to B essentially changes the resource you're referring to, so I still don't see how this is a benefit. Could you please elaborate? – hatfinch Sep 29 '09 at 12:54
Sorry, had my mv backwards -- it should have been mv b a to indicate that the contents of b are now at the path of a. Answer updated. – womble Sep 29 '09 at 13:11
I can see how this would help catch this particular case, but it doesn't catch the echo "changed contents" > a case. It still seems to me to be a half-measure whose unlooked-for side effects outweigh its benefits. But thank you for outlining at least one benefit! – hatfinch Sep 29 '09 at 14:10
It does catch the echo foo > a case because that will change the MTime which is part of the ETag. The default apache ETag uses inode, MTime and size. – freiheit Sep 29 '09 at 18:14
So it does. Thank you very much! – hatfinch Sep 29 '09 at 22:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.