Bug 761451 - guestfs_utimens cannot set times on a directory
guestfs_utimens cannot set times on a directory
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Richard W.M. Jones
Depends On:
  Show dependency treegraph
Reported: 2011-12-08 06:06 EST by Richard W.M. Jones
Modified: 2011-12-08 06:16 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2011-12-08 06:16:33 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2011-12-08 06:06:41 EST
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):


How reproducible:

Comment 1 Richard W.M. Jones 2011-12-08 06:16:33 EST
Fixed in commit 31fba8d8033216f8a288e75fe3f575b73b9ef925.

Note You need to log in before you can comment on or make changes to this bug.