#18724 closed defect (fixed)
VBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests => fixed in 5.2.x x>32
回報者: | kboortz | 負責人: | paulson |
---|---|---|---|
元件: | other | 版本: | VirtualBox 5.2.30 |
關鍵字: | VBoxManage copyto target-directory | 副本: | |
Guest type: | Windows | Host type: | Solaris |
描述
The "VBoxManage copyto" destination directory given to "--target-directory" for a Windows guest now requires an ending slash. I assume this is not an intentional change.
The error message when leaving out the ending slash in the destination "C:/tmp" is
VBoxManage: error: File copy failed VBoxManage: error: Copying file "/tmp/foo" to guest failed: VERR_ACCESS_DENIED VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSessionWrap, interface IGuestSession VBoxManage: error: Context: "int gctlCopyFileToDest(COPYCONTEXT*, const char*, const char*, gctlCopyFlags)" at line 2176 of file VBoxManageGuestCtrl.cpp VBoxManage: error: Copying file "/tmp/foo" to guest failed: VERR_ACCESS_DENIED. VBoxManage: error: Error processing "/tmp/foo", rc=VERR_GENERAL_FAILURE
更動歷史 (7)
comment:1 5 年 前 由 編輯
摘要: | VBoxManage copyto --target-directory now requires an ending slash for Windows guest → VBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests |
---|---|
狀態: | new → assigned |
負責人: | 指定為 |
comment:2 5 年 前 由 編輯
摘要: | VBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests → VBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests => fixed in 5.2.x x>32 |
---|---|
狀態: | assigned → closed |
處理結果: | → fixed |
This has been fixed in 5.2.x (x > 32) and the fix will be part of any 5.2.x Testbuilds with a revision >= r133443. As mentioned previously this doesn't apply to VirtualBox 6.0.x.
跟進: 5 comment:3 5 年 前 由 編輯
This fix seems to break copyfrom --target-directory. This command fails on Windows 7 host with Windows XP/Windows 7 guests in VirtualBox 5.2.34.
>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" guestcontrol vm_win7 copyfrom -v --username User --password 123 --target-directory D:\log C:\Users\User\Desktop\1.txt Creating guest session as user 'User'... Waiting for guest session to start... Successfully started guest session (ID 1) Copying from guest to host ... Directory "D:\log\" already exists Source: C:\Users\User\Desktop\1.txt Copying "C:\Users\User\Desktop\1.txt" to "D:\log\" ... 0%... Progress state: VBOX_E_IPRT_ERROR VBoxManage.exe: error: Opening/creating destination file on host "D:\log\" failed: VERR_PATH_NOT_FOUND. VBoxManage.exe: error: Error processing "C:\Users\User\Desktop\1.txt", rc=VERR_GENERAL_FAILURE Closing guest session ...
When I try without --target-directory,
copyfrom [common-options] [--dryrun] [--follow] [-R|--recursive] <guest-src0> [guest-src1 [...]] <host-dst>
<host-dst> is written from start but not replaced. This corrupts <host-dst> if a smaller file is copied.
This is a regression introduced in VirtualBox 5.2.8 and applies to any type of guest, not just Windows guests. A variety of subsequent changesets reworked this code in VirtualBox 6.0.0 so only 5.2.x is affected.
Here is the output from a MacOS host running VBox 5.2.32 attempting to copy a file to a Linux guest using '--target-directory':