共享 Windows 映射驱动器

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6850179/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 08:37:27  来源:igfitidea点击:

Sharing a Windows mapped drive

windowsfilesharesambafilemap

提问by Bruce Chidester

I have a software archiving solution which requires a Windows share for the client but I want to actually store the files through samba on a Linux host.

我有一个软件归档解决方案,它需要客户端的 Windows 共享,但我想通过 samba 在 Linux 主机上实际存储文件。

This dependency requires that I have a Windows front-end to my Linux file archive.

这种依赖要求我的 Linux 文件存档有一个 Windows 前端。

When I map the Linux Samba share on the client as a drive, I cannot "share" it for the server to see.

当我将客户端上的 Linux Samba 共享映射为驱动器时,我无法“共享”它以供服务器查看。

I tried making a shortcut as well, but no sharing options

我也尝试制作快捷方式,但没有共享选项

Is there a way to create a Windows folder that can be shared and as well, be able to write files to a Samba network share?

有没有办法创建一个可以共享的 Windows 文件夹,并且能够将文件写入 Samba 网络共享?

回答by Neoaurel

Yes you can !

是的你可以 !

On W2008R2: Go into

在 W2008R2 上:进入

Server Manager -Roles --Install File Services ---Install File Server & Distributed File System (DFS) Namespaces and Replication

服务器管理器 - 角色 - 安装文件服务 --- 安装文件服务器和分布式文件系统 (DFS) 命名空间和复制

Now you can go on Administrative tool - DFS Management - and in namespace you can add you share map drive

现在您可以继续使用管理工具 - DFS 管理 - 在命名空间中您可以添加共享地图驱动器

回答by Arun Christopher

Dont know why there are down votes for user3613052's answer. MKLink will be able to do that. It creates a symbolic link to the shared folder which can then be shared.

不知道为什么 user3613052 的答案有反对票。MKLink 将能够做到这一点。它会创建一个指向共享文件夹的符号链接,然后可以共享该文件夹。

MKLink /D D:\newlink \networkpc\folder

Net Share Media=D:\newlink

Then you can access the drive by \\yourpc\newlink

然后您可以通过以下方式访问驱动器 \\yourpc\newlink

http://www.edugeek.net/forums/windows-7/78598-re-sharing-mapped-shared-drive.html#post700170

http://www.edugeek.net/forums/windows-7/78598-re-sharing-mapped-shared-drive.html#post700170

回答by ward

DFS is indeed the answer.

DFS 确实是答案。

map network drive. R-click to creat shortcut for that mapped drive.

映射网络驱动器。右击为该映射驱动器创建快捷方式。

Open DFS (as stated above) new namespace, enter name of server, enter any name for folder

打开 DFS(如上所述)新命名空间,输入服务器名称,为文件夹输入任意名称

Once created, copy/move your shortcut into the namespace folder Default location is c:\dfsroots\

创建后,将您的快捷方式复制/移动到命名空间文件夹默认位置为 c:\dfsroots\

sweet - thanks.

甜 - 谢谢。

回答by user3613052

You can use the mklink command to map the Network drive to a local folder

您可以使用 mklink 命令将网络驱动器映射到本地文件夹

回答by jelmer

I don't think it's possible to share through a network drive on a windows machine. Even if it would be, the performance would probably be terrible.

我认为不可能通过 Windows 机器上的网络驱动器进行共享。即使是这样,性能也可能会很糟糕。

Is it not possible for the backup solution on the client to just use the samba share directly? It should not behave differently from a share on a Windows machine.

客户端的备份方案是不是不能直接直接使用samba共享?它的行为不应与 Windows 计算机上的共享不同。