我正在尝试将 Linksys NAS200 的网络共享挂载到 Fedora 16。
我试图运行的程序不接受要保存到的网络地址。我在没有指定服务器 IP 地址的情况下运行它,它提供了一些随机 IP。我指定了一个 IP,但它找不到该设备。
以下是错误:
[root@HOME ~]# mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass
mount.cifs kernel mount options: ip=184.106.31.190,unc=\\NAS_SERVER\public,,ver=1,user=user,pass=********
mount error(115): Operation now in progress
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
[root@HOME ~]# mount -t cifs -v //NAS_SERVER/public/ /mnt/ -o username=user,password=pass,ip=192.168.1.77
ip address 192.168.1.77 override specified
mount.cifs kernel mount options: ip=192.168.1.77,unc=\\NAS_SERVER\public,,ver=1,user=user,pass=********
Retrying with upper case share name
mount.cifs kernel mount options: ip=192.168.1.77,unc=\\NAS_SERVER\PUBLIC,,ver=1,user=user,pass=********
mount error(6): No such device or address …Run Code Online (Sandbox Code Playgroud) 我网络上的防火墙会丢弃 TCP 端口 139 和 445 上的所有数据包。因此,所有 samba 共享都不能在 LAN 之外工作。
我尝试让 samba 守护进程监听非标准端口。这种方法适用于Linux,因为二者smbclient并smbmount有一个选项可以设置服务器端口。但是在 Windows 上我找不到类似的选项。
Windows 是否支持在非标准端口上安装 smb 共享?第三方软件也是可以接受的。
编辑:
\\hostname:port\share在 Windows 资源管理器中不起作用。奇怪的是,我可以看到在服务器上建立了连接。但是 Windows 一直告诉我无法访问服务器。即使在具有标准端口 445 的 LAN 中它也不起作用,在这种情况下,没有端口号的路径将通过。
我知道这个问题已经被问过几次了,但我认为我的问题可能略有不同。也许我不了解问题的基本原理。
我有一个 Linux Samba 共享,我想通过 ssh 隧道从 Windows 中使用它。当我在 VPN 上时,我可以访问 Samba 共享,并且隧道端口 139 在 Linux 上工作正常。当我从 VPN 之外的 Linux 机器访问共享时,我需要做的就是像这样转发端口 139:
ssh user@remotehost -L 1139:localhost:139
Run Code Online (Sandbox Code Playgroud)
然后挂载驱动:
mount -t cifs //remotehost/shared /mnt/cifs -o username=myuser,password=mypass,ip=127.0.0.1,port=1139
Run Code Online (Sandbox Code Playgroud)
对于 Windows,我尝试按照教程通过 PuTTY 创建环回适配器和隧道:http : //www.nikhef.nl/~janjust/CifsOverSSH/Win8Loopback.html
这不起作用,所以我尝试遵循使用端口 139 而不是 445 的不同教程:https : //www.simonholywell.com/post/2009/04/samba-file-share-over-ssh-tunnel/
这两个教程都没有奏效,所以我想我的第一个问题是我实际上需要转发这些端口中的哪一个?我需要端口 139、端口 445 还是两者都需要?我不明白这可能是什么问题。
如果您需要任何其他信息,请告诉我,我曾尝试使用 nmap 进行故障排除,但没有取得任何进展。
我收到安装错误 (5):
安装到 cifs windows 共享时的输入输出错误。
执行的命令:
sudo /bin/mount -t cifs //server/folder /mnt/folder/ -o username="domain/username",password=password
Run Code Online (Sandbox Code Playgroud)
错误返回:
mount error(5): 输入/输出错误 参考 mount.cifs(8) 手册页(例如 man mount.cifs)
ams 命令适用于 RHEL 32 。
安装 Ubuntu 12.04 后,我尝试使用始终有效且服务器未更改的脚本命令在 Linux 下从 Windows 挂载 samba 共享。
错误如下:
$ mount -t cifs //<host>/<share> /media/<share> -o username=<user>,password=<pass>
mount: block device //<host>/<share> is write-protected, mounting read-only
mount: cannot mount block device //<host>/<share> read-only
$
Run Code Online (Sandbox Code Playgroud)
我已经阅读了很多关于权限的讨论,但不幸的是,这不是问题所在。我在下面提交我自己的答案以供参考,希望这对其他人有所帮助。
我已经更新了 Windows 10 并在 Windows 上安装了新的 bash。
但是,在我尝试过的两台 PC 上,我都无法安装网络共享。
我尝试了许多不同的方法来安装共享:
sudo mount -t cifs -o username=xx,password=xx //192.168.x.x/Share /mnt/s
运行上面的命令时,它看起来已经起作用了,没有错误(即使有--verbose选项)但是/mnt/s什么也不mount显示并显示://192.168.x.x/Share on /mnt/s type cifs (rw).
我能够使用 smbclient 浏览共享上的所有文件/文件夹
我有一个 Windows 7 桌面,它有 3 个驱动器映射到 FreeBSD 家庭服务器上的 CIFS 共享。CIFS 共享上还存储了特殊文件夹(桌面等)。
其中每一个(包括出于某种原因的特殊文件夹)都有自己的回收站设置,我已经配置为不使用回收站。但是,每次我删除计算机上任何位置的文件(包括也禁用了回收站的本地磁盘)时,我会在桌面上看到一个 $RECYCLE.BIN 文件夹,这很烦人。这个文件夹里面总是一个desktop.ini. 通常我看不到desktop.ini本地驱动器上的其他文件,因为我隐藏了受保护的操作系统文件。
我无法隐藏文件夹,因为 CIFS 似乎没有存储隐藏或系统属性(因此我desktop.ini也看到了这些文件),尽管告诉客户端将点文件视为隐藏。
我收到了一台 mac,但遇到了问题。我有一个 ubuntu 设置,我会在其中输入:
sudo mount -t cifs //fs/CakeRecipes /mnt/fs/CakeRecipes -o username=fegur,domain=KitchenLord,iocharset=utf8,file_mode=0777,dir_mode=0777
Run Code Online (Sandbox Code Playgroud)
以访问 CakeRecipes 文件夹。遗憾的是,这不适用于 OSX。如果我直接输入这个命令,我会得到
mount: exec /Library/Filesystems/cifs.fs/Contents/Resources/mount_cifs for /mnt/fs/KitchenLord: No such file or directory
Run Code Online (Sandbox Code Playgroud)
我已经在本地机器上创建了 /mnt/fs/KitchenLord,所以我不确定这个错误在说什么。
任何提示将不胜感激。谷歌搜索没有多大帮助。
我正在尝试使用在 Windows 10 的 Linux 子系统上运行的 Debian 10 Linux 发行版来挂载 Windows 共享 (SMB/CIFS),并使用 fstab 在启动时自动挂载。我的软件规格是
\nOS: Windows 10 Pro 21H2\nOS Build: 19044.1526\n \nWindows Subsystem for Linux 2 (WSL2)\nDistribution: Debian 10.11\nRun Code Online (Sandbox Code Playgroud)\n根据 Microsoft 的以下文章,您可以创建一个文本文件来/etc/wsl.conf存储 WSL2 的用户配置设置。
https://docs.microsoft.com/en-us/windows/wsl/wsl-config
\n我开始使用wsl.conf将mountFsTab键设置为 true。这应该确保 WSL 处理 fstab 文件。我知道该设置应该无关紧要,因为它默认为 true,但我想确保它设置为 true。我的wsl.conf文件当前如下所示:
\n# Automatically mount Windows drive when the distribution is launched. \n[automount]\n# Automatically mount the fixed drives (C:) under /mnt.\nenabled = false\n# Sets the `/etc/fstab` …Run Code Online (Sandbox Code Playgroud) Windows 服务器通过 CIFS/SMB 协议提供名为 data 的网络目录。数据文件夹安装在带有密码和用户身份验证的 Linux 客户端上。
有时驱动器会断开连接,但一秒钟后又可以使用。我不知道确切的原因,但似乎是因为 Windows 服务器或损坏的网络组件。
如何让 Linux 尽快自动重新连接?
cifs ×10
mount ×6
samba ×4
linux ×3
networking ×3
smb ×2
ubuntu ×2
windows ×2
windows-10 ×2
bash ×1
fedora ×1
macos ×1
recycle-bin ×1
smbfs ×1
ssh ×1
ssh-tunnel ×1
windows-7 ×1