VirtualBox

5 年 前 建立

5 年 前 結束

5 年 前 更新

#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 年 前paulson 編輯

摘要: VBoxManage copyto --target-directory now requires an ending slash for Windows guestVBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests
狀態: newassigned
負責人: 指定為 paulson

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':

$ VBoxManage guestcontrol debian --username user --password password copyto /etc/group --target-directory /tmp
Type Manifest File: /Users/paulson/Library/VirtualBox/xpti.dat
nsNativeComponentLoader: autoregistering begins.
nsNativeComponentLoader: autoregistering succeeded
nNCL: registering deferred (0)
VBoxManage: error: File copy failed
VBoxManage: error: Copying file "/etc/group" to guest failed: VERR_IS_A_DIRECTORY
VBoxManage: error: Details: code VBOX_E_IPRT_ERROR (0x80bb0005), component GuestSessionWrap, interface IGuestSession
VBoxManage: error: Context: "int gctlCopyFileToDest(PCOPYCONTEXT, const char *, const char *, gctlCopyFlags)" at line 2180 of file VBoxManageGuestCtrl.cpp
VBoxManage: error: Copying file "/etc/group" to guest failed: VERR_IS_A_DIRECTORY.
VBoxManage: error: Error processing "/etc/group", rc=VERR_GENERAL_FAILURE
ipcDConnectService Stats
 => number of worker threads: 1

comment:2 5 年 前paulson 編輯

摘要: VBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guestsVBox 5.2.x: VBoxManage copyto --target-directory now requires an ending slash for guests => fixed in 5.2.x x>32
狀態: assignedclosed
處理結果: 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.

最後由 paulson 編輯於 5 年 前 (上一筆) (差異)

comment:3 5 年 前robpats 編輯

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.

comment:4 5 年 前robpats 編輯

狀態: closedreopened
處理結果: fixed

回覆:  3 ; comment:5 5 年 前Frank Batschulat (Oracle) 編輯

Replying to robpats:

This fix seems to break copyfrom --target-directory.

Then a new bug should be filed against the currently used release.

Re-opening this old one which had a source code change is not the right action.

comment:6 5 年 前Frank Batschulat (Oracle) 編輯

狀態: reopenedclosed
處理結果: fixed

回覆:  5 comment:7 5 年 前robpats 編輯

Replying to fbatschu:

Then a new bug should be filed against the currently used release.

Re-opening this old one which had a source code change is not the right action.

Thank you for clarifying the bug reporting policy.

I have created a new ticket #19256 for this.

注意: 瀏覽 TracTickets 來幫助您使用待辦事項功能

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette