我安装了 MacFUSE(来自http://code.google.com/p/macfuse/downloads/list),重新启动,然后下载 sshfs-static-leopard.gz,并将 sshfs-static-leopard 移至 /usr/sbin/ sshfs(并对其进行了 chmod 755)。
我已经在工作中配置了一台 Ubuntu 机器(主机名为“daryls”),所以我可以在没有密码的情况下通过 ssh 进入它。但是当我尝试时sshfs daryls:/ /Volumes/daryls -oauto_cache,reconnect,volname=daryls,我得到:
warning: ssh nodelay workaround disabled
mount_fusefs: failed to mount /Volumes/daryls@/dev/fuse0: Operation not permitted
Run Code Online (Sandbox Code Playgroud)
什么操作是不允许的?
我运行的是 Mac OS X 10.6.7?是不是 sshfs-static-leopard.gz 不适用于雪豹?或者它只能在 32 位模式下工作?如何确定我是否在 64 位模式下启动 Mac OS X?
更新:周五我用 Ubuntu 11.04 VM(在 VMware Fusion 3.1.3 中运行)进行了尝试。我很确定我只是做了一个常规的mkdir /Volumes/ubuntu(没有 sudo),然后sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu它起作用了。
但是今天我遇到了同样的mount_fusefs: failed to mount /Volumes/ubuntu@/dev/fuse0: Operation not permitted错误。
我尝试使用 sudo 创建 /Volumes/ubuntu 目录,这没有区别。然后我尝试运行sudo sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu并得到:
warning: ssh nodelay workaround disabled
remote host has disconnected
Run Code Online (Sandbox Code Playgroud)
但是ssh ubuntu有效。
我不知道为什么它可以工作,而现在不行。我会尝试重新启动我的 MacBook Air,以防万一。
更新#2:重新启动后,我跑了:
$ cd /Volumes/
$ mkdir ubuntu
$ sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu
warning: ssh nodelay workaround disabled
Run Code Online (Sandbox Code Playgroud)
有效。
所以我仍然没有回答我的问题。但我可能有一个解决方法。
顺便说一句:它在 System Profiler 中的“系统软件概述”下的“64-but Kernel and Extensions”对面说“No”(我按照Handyman5的指示打开了它)。
更新 #3:收到“不允许操作”错误后,我重新启动并再次得到它。(换句话说,重新启动不是一个可靠的解决方法。)
更新 #4:这是有效的,然后我犯了一个错误,即在没有卸载 sshfs 卷的情况下重新启动了我的 Ubuntu VM。现在我再次收到“不允许操作”错误。(也许 /Volumes 目录处于某种锁定状态。)
我在下面阅读了Handyman5的评论,然后阅读了http://hints.macworld.com/article.php?story=20031017061722471和 chflags 的手册页。然后我做了:
$ ls -lOd /Volumes/
drwxrwxrwt@ 5 root admin hidden 170 Jul 15 13:22 /Volumes/
$ ls -lOd /Volumes/ubuntu/
drwxr-xr-x+ 2 root admin - 68 Jul 15 13:08 /Volumes/ubuntu/
Run Code Online (Sandbox Code Playgroud)
(根据 chflags 手册页,查看标志的 ls 选项是 -O,而不是 -o。这在 ls 手册页中得到确认。)
如您所见,它没有显示任何标志。(虽然我想知道 '@' 和 '+' 表示什么。我阅读了http://lists.apple.com/archives/Macos-x-server/2008/Jan/msg00138.html并使用了 xattr,但没有学不到任何东西。)
出于绝望,我尝试过sudo chflags nouchg /Volumes,sudo chflags nouchg /Volumes/ubuntu但仍然出现“不允许操作”错误。
更新 #5:自从我最初发布这个已经有一段时间了,但是 IIRC 这一切都来自我试图解决MacFusion不与 MacFUSE 和 SSHFS一起工作的问题(当尝试使用 SSHFS 挂载在 Ubuntu VM 中运行的卷时)。我最近学习了 OS X 的 FUSE。我安装了它,重新安装了SSHFS,现在 MacFusion 运行完美。
您的用户帐户可能无法/Volumes直接将卷装入目录。您是否尝试安装sshfs到您自己的主目录中的目录中?
否则,您可能需要具有管理 ( sudo) 权限才能运行sshfs. 尝试用sudo这样的命令作为该命令的开头:
sudo sshfs daryls:/ /Volumes/daryls -oauto_cache,reconnect,volname=daryls
Run Code Online (Sandbox Code Playgroud)
顺便说一句:要确定您的 Mac 是否在 64 位模式下运行:
- 从 Apple 菜单中选择关于本机。
- 单击更多信息。
- 在内容窗格中选择软件。
- 在系统软件概述标题下查找“64 位内核和扩展:是(或否)” 。
| 归档时间: |
|
| 查看次数: |
37809 次 |
| 最近记录: |