VirtualBox

Opened 9 years ago

#13925 new defect

file timestamp not preserved on tar-extracted files in shared folders on linux guest windows host

Reported by: sargac Owned by:
Component: other Version: VirtualBox 4.3.24
Keywords: timestamp, shared folder, linux guest, windows 7 host, tarball timestamp, tar Cc:
Guest type: Linux Host type: Windows

Description

There is a strange behavior, that files extracted from TAR package within shared folders on Linux guest/Windows host, does not preserve file timestamp stored in a tarball. The files' timestamp get converted to the extraction time.

I've searched through Virtualbox issues, and saw another ticket regarding timestamp in shared folders, #6473, but that was solved years ago, and does not apply to this particular issue.

Issue is easily reproducable:

  • configuration: Windows 7 Host, Linux (Debian, no GUI) Guest
  • using tar command from a Linux Guest shell, create a TAR of an older "test file", so the timestamp would be evident,
  • delete the "test file"
  • extract the "test file" from a tar archive
  • the timestamp will be wrong, as tar preserves timestamp by default
  • to confirm we can do the same procedure within another Linux Guest folder, other than the shared folder, and the timestamp will be preserved.

Here's code sample, presuming we have a file.pdf test file, within /var/www/shared folder, which is a shared folder, both Linux guest and Windows 7 host can see:

cd /var/www/shared
ls -la
> -rwxrwxrwx 1 root root 11654 Jan 23 08:16 file.pdf
tar -c -f test.tar file.pdf
rm file.pdf
tar -x -f test.tar
ls -la
> -rwxrwxrwx 1 root root 11654 Mar 5 17:30 file.pdf
> -rwxrwxrwx 1 root root 11654 Mar 5 17:30 test.tar

I would kindly ask anyone to answer if there is a solution to this problem, or is there anything we can do to preserve original timestamps at tar extraction process within shared folders, so we don't need to extract files in a separate folders and move the files back, as we need those timestamps.

We have both, current Virtualbox and current Guest Additions installed.

Change History (0)

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use