我正在尝试在macOS Catalina上使用automount
和设置SSH端点的自动挂载sshfs
。但是,它不起作用,我不确定为什么。
/etc/auto_master
+auto_master # Use directory service
#/net -hosts -nobrowse,hidefromfinder,nosuid
/home auto_home -nobrowse,hidefromfinder
/Network/Servers -fstab
/- -static
# custom; auto-mount wolverine (parker lab setup)
/- auto_wolverine -nosuid
/etc/auto_wolverine
/System/Volumes/Data/wolverine/home -fstype=sshfs,reconnect,nodev,follow_symlinks,allow_other,StrictHostKeyChecking=no,IdentityFile=IDFILE,port=PORT,ServerAliveInterval=360,ServerAliveCountMax=3 USER@HOST:/home
/etc/sythetic.conf
wolverine /System/Volumes/Data/wolverine
我还将sshfs
二进制文件链接到/usr/local/bin/mount_sshfs
我所看到的教程之一。但是,当我尝试打开目标目录(刷新挂载后)时,显示No such file or directory
。任何帮助,将不胜感激。
这里的问题是automount
试图在mount_sshfs
内部搜索/sbin
。因此,尽管您已经创建了该符号链接,但它不适用于automount
。
由于macOS Catalina/sbin
已安装为只读卷,因此您将无法创建所需的符号链接:/sbin/mount_sshfs -> /usr/local/bin/sshfs
。您可以在Apple的支持网页上找到更多信息。
在macOS 10.15 Catalina的早期版本中,对我有用的一件事是禁用系统完整性保护,并从Recovery OS分区创建所需的符号链接。但是我不知道这仍然适用于Catalina。
您可以在本文档中找到如何禁用SIP 。
如果最终设法创建符号链接,则可能需要添加以下守护程序以启用自动扩展的内核扩展:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Disabled</key>
<false/>
<key>Label</key>
<string>sysctl</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>-c</string>
<string>/Library/Filesystems/osxfuse.fs/Contents/Resources/load_osxfuse; /usr/sbin/sysctl -w vfs.generic.osxfuse.tunables.allow_other=1</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
叫它load.osxfusefs.tunables.plist
放进去/Library/LaunchDaemon
您可以在Apple StackExchange的此答案中找到解释得非常清楚的指南。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句