简体   繁体   English

Cygwin下的Windows文件共享?

[英]Windows file share under Cygwin?

I have an issue with mounting Windows file share in Cygwin. 我在Cygwin中安装Windows文件共享时遇到问题。

We have Windows file share which is using NFS to share content. 我们有Windows文件共享,该文件正在使用NFS共享内容。 I was assigned to install Cygwin on it so some application can connect over SFTP to that server. 我被分配在其上安装Cygwin,以便某些应用程序可以通过SFTP连接到该服务器。

Now they need to access the shared folder from that application and the app would pull data from that folder.The thing is that the folder is Windows shared folder (exmple; \\server\\photos). 现在他们需要从该应用程序访问共享文件夹,该应用程序将从该文件夹中提取数据。事实是该文件夹是Windows共享文件夹(例如; \\ server \\ photos)。 the current Windows users need to be able to connect to that share (it is mapped to their M drive) and the app need to connect to SFTP and pull the data from there. 当前的Windows用户需要能够连接到该共享(该共享已映射到他们的M驱动器),而应用程序需要连接到SFTP并从那里获取数据。

My idea was to mount that NFS share in Cygwin and set it as /home directory so when the app connects, it automatically goes there. 我的想法是在Cygwin中挂载该NFS共享并将其设置为/ home目录,以便当应用程序连接时,它会自动转到该目录。

My questions are: is this possible, and does anyone know any better solutions? 我的问题是:这可能吗?有人知道更好的解决方案吗?

I am open for all suggestions. 我愿意接受所有建议。

Thank you. 谢谢。

Cygwin views the top of its directory tree / to be within the Windows directory C:\\cygwin64 (or whatever its installation directory was). Cygwin会在Windows目录C:\\cygwin64 (或其任何安装目录)中查看其目录树/的顶部。 As a result, you are unable to move above that point in the filesystem from a Cygwin shell. 结果,您将无法从Cygwin Shell移动到文件系统中的该点之上。 The solution is to go through Cygwin's directory /cygdrive , which is automatically set up as the access point where all Windows disk drives are mounted. 解决方案是浏览Cygwin的目录/cygdrive ,该目录自动设置为安装所有Windows磁盘驱动器的访问点。 If your shared folder is mounted in Windows as M: , you should be able to access it in Cygwin as /cygdrive/m without any additional work. 如果您的共享文件夹在Windows上以M:挂载,您应该可以在Cygwin中以/cygdrive/m方式访问它,而无需进行任何其他工作。

As far as setting it up as /home , you might be able to create a symbolic link from /home to /cygdrive/m if that is what you need. 至于将其设置为/home ,如果需要的话,您也许可以创建从/home/cygdrive/m的符号链接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM