8

After using sshfs on my Mac I am no longer able to see my user directory.

When I open a terminal window I see the following:

Last login: Mon May 22 10:54:30 on ttys003
mkdir: /Users/<username>/.bash_sessions: Device not configured
-bash: /Users/<username>/.bash_profile: Device not configured
touch: /Users/<username>/.bash_sessions/35166655-583B-47CC-9BCF-5E785DD5E46E.historynew: Device not configured

Is there any way to fix this?

Cheers Paul

runnerpaul
  • 5,942
  • 8
  • 49
  • 118

2 Answers2

26

I used to use sshfs and got this error; the only way to fix it I found without rebooting was:

sudo diskutil umount force /path/to/mount

I've recently been trying https://github.com/spion/adbfs-rootless for something else and find I can get into the same situation, the "fix" works in that case as well.

drkvogel
  • 2,061
  • 24
  • 17
  • 2
    Then you have too run `sshfs` again to re-mount it. Worked for me, thanks. – sligocki Nov 25 '19 at 16:49
  • 1
    Running macOS 10.15.7 I had to use the full path for the command, e.g. `sudo /usr/sbin/diskutil umount force /path/to/mount` – bhfailor Mar 14 '22 at 16:38
  • As it happens I'm running into this very same problem. Unfortunately, `sudo diskutil umount force /my/mount/path/` gives 'Unmount failed for '. Any other remedy besides a full reboot? – RocketNuts May 27 '22 at 09:06
  • 1
    Update on my previous comment, in case it benefits anyone else: to my own surprise it did work with the following command: `umount -f /my/mount/path` The path was now unmounted and I could move or delete it. Not sure what the difference is between this and `diskutil umount force` but somehow it did the trick – RocketNuts May 27 '22 at 21:12
1

Wasn't getting anywhere so took a chance and did a reboot. Everything seems to be OK now.

runnerpaul
  • 5,942
  • 8
  • 49
  • 118