osxfuse / sshfs

File system based on the SSH File Transfer Protocol
http://fuse.sourceforge.net
GNU General Public License v2.0
1.17k stars 130 forks source link

M2 Macbook pro Apple Slilicon SSHFS #83

Closed apresley13 closed 1 year ago

apresley13 commented 1 year ago

hello, i've recently got a M2 mac, and installing SSHFS is requiring me to enable system level extensions. i noticed on the site that macfuse states it supports apple proccessors but not SSHFS. is this correct it isn't support on apple silicon?

Screenshot 2023-09-18 at 8 52 53 AM Screenshot 2023-09-18 at 8 53 16 AM
wunderlins commented 1 year ago

sshfs runs on M1/M2, I can personally attest. But with MacOS Sonoma (or earlier releases) Apple started locking down their root file system an protecting kernel modules. You might have to regain control over the system: https://apple.stackexchange.com/questions/159316/how-to-get-automount-and-sshfs-osxfuse-working-with-yosemite/245009#245009

in short: csrutil disable in recovery mode.

Be aware that this is disabling some apple security features that prevent malicious code being loaded into the kernel. Older OSX did not have this feature so there is that.

bfleischer commented 1 year ago

Please see Getting Started

SSHFS 2.5.0 (the build from https://macfuse.io) is an Intel binary and requires Rosetta 2 to run on your M1/M1 Mac.

in short: csrutil disable in recovery mode.

I cannot stress this enough: macFUSE does not require you to disable System Integrity Protection. macFUSE is fully signed and notarized by Apple. You need to enable support for loading third-party kernel extension, but you do not need to disable System Integrity Protection. I highly recommend against it.

wunderlins commented 1 year ago

Sorry on one hand you say:

in short: csrutil disable in recovery mode.

on the other hand you say:

I cannot stress this enough: macFUSE does not require you to disable System Integrity Protection (SIP).

What is it now, enable or disable?

on a related topic, how do you get a symlink into /sbin/mount_sshfs? this file location seems to be required by AUTOMOUNT(8)

I have been banging my head against a wall for hours now, I don't get sshfs & autofs working with SIP enabled. Any advice highly appreciated.

bfleischer commented 1 year ago

@wunderlins

What is it now, enable or disable?

I cited your "csrutil disable" remark and advised against it. It's pretty clear in my opinion. Please see the indentation.

on a related topic, how do you get a symlink into /sbin/mount_sshfs? this file ocation seems to be required by AUTOMOUNT(8)

The original poster did not say anything about them wanting to use automount. Installing macFUSE (or sshfs) does not require you to disable SIP. The op's screenshots indicate that they are struggling to load the macFUSE kernel extension.

Placing a symlink in /sbin is a whole different story, but that's not what the op was asking about. Recommending to disable SIP like this is dangerous. Your post seems to indicate that SIP needs to be disabled in order to be able to load the macFUSE kernel extension, but this is not true. The StackExchange post you linked does not contain instructions on how to enable SIP after modifying the root file system.

Modifying the root volume should be avoided, if possible. I'm not sure if disabling SIP is even required in your case. Have a look at synthetic.conf(5).

man synthetic.conf

This lets you place symlinks on the root volume without having to disable SIP.