安装网络驱动器在 DOS 中可以工作,但在 Cygwin 中会中断。为什么?
我正在使用 VirtualBox 来设置 Windows 2008 服务器。我想添加共享文件夹,但遇到问题。
在 DOS 中运行它有效:
net use t: \\vboxsrv\v-root
但在 Cygwin 中:
$ net use t: "\\vboxsrv\v-root"
System error 53 has occurred.
The network path was not found.
我也尝试过这些:
$ net use t: \\vboxsrv\v-root
$ net use t: \\\\vboxsrv\\v-root
我尝试创建一个包含工作 DOS 命令的 bat 脚本,并从 cygwin 执行它。它们都因相同的错误而失败。
我需要通过Cygwin来完成,因为我通过SSH访问系统,并登陆Cygwin环境。如果有任何方法可以暂时从 Cygwin 内部“突破”cygwin,那可能是一种方法..
我错过了什么?
I'm using VirtualBox to set up a windows 2008 server. I'd like to add a shared folder, but am running into problems.
Running this in DOS works:
net use t: \\vboxsrv\v-root
But in Cygwin:
$ net use t: "\\vboxsrv\v-root"
System error 53 has occurred.
The network path was not found.
I've also tried these:
$ net use t: \\vboxsrv\v-root
$ net use t: \\\\vboxsrv\\v-root
And I've tried creating a bat script containing the working DOS command, and executing it from cygwin. They all fail with the same error.
I need to do it through Cygwin, because I access the system via SSH, and land in a Cygwin environment. If there is any way to "break out" of cygwin temporarily from within Cygwin, that might be a way to go..
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在某处创建一个文件夹,例如:
现在您可以在 cygwin 中使用挂载程序,如下所示:
Easy as 1,2,3 :-)
Create a folder somewhere, like:
Now you can us the mount program in cygwin, like so:
Easy as 1,2,3 :-)
Windows 根路径通常位于
/cygdrive/
下。尝试类似的东西The Windows root path is typically found somehwere under
/cygdrive/
. Try something like对于此错误,
!)使用“sudo chmod 777 -R /home/username/Shared”授予主机端共享文件夹的完全权限(Shared 是文件夹名称,我们必须共享。)
!!)在访问共享文件夹之前,在 Virtualbox 中打开 Guest。:从菜单中选择“安装 Guest Additions”
!!!)单击开始,右键点击计算机,选择“映射网络驱动器”
!V) 在其中选择任何驱动器,然后在该类型文件夹“\Yourhostipaddress\Shared”下。下面选择“使用凭据连接”(Yourhostipaddress 是主机 IP 地址,共享 是主机端的共享文件夹名称。)
V) 单击“连接”按钮。它会询问您主机用户名和密码。
V!) 它将成功映射共享驱动器!!!!!!!!!!!!!!!
如果仍然出现错误,请在下面添加评论。
For this error,
!) Give full rights to Shared folder at Host side using "sudo chmod 777 -R /home/username/Shared" (Shared is a folder name which we have to be shared.)
!!) Open Guest in Virtualbox, before accessing shared folder.: "Install Guest Additions" From Menu
!!!) Click START, Right click on Computer , Select "Map Network Drive"
!V) In that select any drive and bellow that type folder "\Yourhostipaddress\Shared". Bellow that select "connect with credential" (Yourhostipaddress is a HOST IP ADDRESS and Shared is Shared folder name at host side. )
V) Click On connect button. It will ask you host username and password.
V!) It will map with shared drive successfully !!!!!!!!!!!!!!!!
If still getting error, Put comments bellow this.