Incorrect file timestamps for files inside of Windows Host directories shared with Linux Guests

Discussions about using Linux guests in VirtualBox.
Post Reply
mikegold10
Posts: 3
Joined: 13. Jun 2023, 00:49

Incorrect file timestamps for files inside of Windows Host directories shared with Linux Guests

Post by mikegold10 »

For recent Linux kernel versions (i.e., all 6.6.x and 6.8.x kernel versions, with the first of the 6.6.x series released officially on October 2023), you will see incorrect timestamps for both the File Last Modified and File Last Accessed times of files (and likely directories) that reside in a folder that is shared via Virtual Box from a Windows Host to a Linux Guest.

A ticket has already been created for this bug (with further details on the kernels affected): https://www.virtualbox.org/ticket/22047
Note: Despite the report in the ticket, all versions of Virtual Box (Guest Additions) are affected and all Linux distros, within the kernel version constraints mentioned in the preceding paragraph where this break in existing correct functionality occurs.

Inside of the above ticket, I have also posted a patch that fixes this bug in the vboxsf/shared folders source code (vboxsf/utils.c), if you feel adventurous enough to modify the code (at your own risk!) and rebuild/reinstall Guest Additions with the patch, that can be used until this gets officially resolved in a proper Virtual Box release (i.e., who knows when - they have bigger fish to fry with 7.0.16's present issues).
Post Reply