| Summary: | guestfs_utimens cannot set times on a directory | ||
|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | Richard W.M. Jones <rjones> |
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> |
| Status: | CLOSED UPSTREAM | QA Contact: | |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | unspecified | CC: | mbooth, virt-maint |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-12-08 11:16:33 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Fixed in commit 31fba8d8033216f8a288e75fe3f575b73b9ef925. |
Description of problem: You can set times on ordinary files, as in this example: $ guestfish -N fs -m /dev/sda1 -- \ touch /foo : utimens /foo -1 -1 -1 -1 But the same call fails for a directory: $ guestfish -N fs -m /dev/sda1 -- \ mkdir /foo : utimens /foo -1 -1 -1 -1 libguestfs: error: utimens: open: /foo: Is a directory The reason is that the current implementation of do_utimens opens the path first, and the open fails with -EISDIR. Version-Release number of selected component (if applicable): 1.15.10 How reproducible: 100%