Bug 51325
| Summary: | Incorrectly modifies ctime of directory entry | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | Dave J <dwjef> |
| Component: | tmpwatch | Assignee: | Preston Brown <pbrown> |
| Status: | CLOSED WONTFIX | QA Contact: | Brian Brock <bbrock> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.2 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | i386 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-08-09 14:55:19 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Dave J
2001-08-09 14:55:15 UTC
The mtime for a file or directory is updated by the filesystem each time the file is modified. Prior to modifying a file, an application can save the file's mtime, and then reset it after the modification using the utime(2) system call. The atime for a file or directory is updated by the filesystem each time the file is accessed (read or write). Prior to accessing a file, an application can save the file's atime, and then reset it after the file access using the utime(2) system call. The ctime for a file or directory is updated each time the file or directory's inode is changed; examples of this are changing permissions, ownership, link-counts, etc. The ctime for a file or directory can NOT be saved before and reset after a change. Another significant fact is that the ctime of a file or directory is CHANGED when resetting the mtime and atime (using the utime(2) system call) for the file. When tmpwatch reads the data for a file to determine whether or not it should be removed, it does not affect the file modification time, but does affect the file's access time. For this reason, NetBackup saves the file's atime and mtime prior to reading the file, and resets the atime and mtime using the utime(2) system call. By "covering it's tracks", tmpwatch does not cause grief for HSM products or administrator scripts that are utilizing file access times (atime) as criteria for their operations. While this benefit is obvious, a side effect is that it does update the file's ctime. There is no way around this while maintaining compatibility with UNIX standards. |