From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7 Description of problem: mtime is changed on files when invoked with the --atime-preserve switch. Version-Release number of selected component (if applicable): tar (GNU tar) 1.13.25 How reproducible: Always Steps to Reproduce: [root@somewhere dir]# stat ffa File: `ffa' Size: 69 Blocks: 8 IO Block: 4096 Regular File Device: 3a00h/14848d Inode: 584178 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 500/rmetzger) Gid: ( 100/ users) Access: 2003-11-17 20:07:47.000000000 +0100 Modify: 2003-09-04 00:39:45.000000000 +0200 Change: 2004-01-06 01:02:54.000000000 +0100 [root@somewhere dir]# tar --atime-preserve -cf test.tar ffa [root@somewhere dir]# stat ffa File: `ffa' Size: 69 Blocks: 8 IO Block: 4096 Regular File Device: 3a00h/14848d Inode: 584178 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 500/rmetzger) Gid: ( 100/ users) Access: 2003-11-17 20:07:47.000000000 +0100 Modify: 2003-09-04 00:39:45.000000000 +0200 Change: 2004-01-07 00:24:31.000000000 +0100 Actual Results: see above (mtime was changed) Expected Results: mtime should not be changed Additional info: Ok, I know this sounds rediculous, BUT: - this only happens when the file was not just created!!! I tried this on files some days old (with an atime or mtime older than today, see above). If you do this on files just created (e.g. atime/mtime is today, everything works fine! (no bug) I did not try however how old the file has to be exactly. IMPACT: This causes big problems in intruder detection programs, such as tripwire.
man tar: --atime-preserve donât change access times on dumped files -Tar does not change mtime. Even in your example mtime is not changed. -ctime is changed because tar restore(--atime-preserve) atime.