Why do I get “Operation not permitted” when trying to mount a volume using sshfs and MacFUSE?
I installed MacFUSE (from http://code.google.com/p/macfuse/downloads/list), restarted, and then downloaded sshfs-static-leopard.gz, and moved sshfs-static-leopard to /usr/sbin/sshfs (and did a chmod 755 on it).
I’ve configured an Ubuntu machine at work (with the hostname “daryls”) so I can ssh into it without a password. But when I try sshfs daryls:/ /Volumes/daryls -oauto_cache,reconnect,volname=daryls, I get:
warning: ssh nodelay workaround disabled
mount_fusefs: failed to mount /Volumes/daryls@/dev/fuse0: Operation not permitted
What operation is not permitted?
I’m running Mac OS X 10.6.7? Could it be that sshfs-static-leopard.gz doesn’t work with Snow Leopard? Or perhaps it only works in 32-bit mode? How do I find out if I’m booting Mac OS X in 64-bit mode?
Update: On Friday I tried this with an Ubuntu 11.04 VM (running in VMware Fusion 3.1.3). I’m pretty sure I just did a regular mkdir /Volumes/ubuntu (without sudo), followed by sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu and it worked.
But today I’m getting the same mount_fusefs: failed to mount /Volumes/ubuntu@/dev/fuse0: Operation not permitted error.
I tried creating the /Volumes/ubuntu directory with sudo, which made no difference. Then I tried running sudo sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu and got:
warning: ssh nodelay workaround disabled
remote host has disconnected
But ssh ubuntu works.
I have no idea why it was working and now isn’t. I’ll try restarting my MacBook Air, just in case.
Update #2: After restarting, I ran:
$ cd /Volumes/
$ mkdir ubuntu
$ sshfs ubuntu:/ /Volumes/ubuntu -oauto_cache,reconnect,volname=ubuntu
warning: ssh nodelay workaround disabled
It worked.
So I still don’t have an answer to my question. But I may have a workaround.
BTW: It says “No” across from “64-but Kernel and Extensions” under “System Software Overview” in the System Profiler (which I opened following Handyman5‘s directions).
Update #3: After getting the “Operation not permitted” error, I restarted and got it again. (In other words, restarting is not a reliable workaround.)
Update #4: This was working, and then I made the mistake of restarting my Ubuntu VM without unmounting the sshfs volume. Now I’m getting the “Operation not permitted” error again. (Perhaps the /Volumes directory is left in some kind of locked state.)
I read Handyman5‘s comment below, and then read http://hints.macworld.com/article.php?story=20031017061722471 and the man page for chflags. I then did:
$ 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/
(According to the chflags man page, the ls option to see flags is -O, not -o. This is confirmed in the ls man page.)
As you can see, it’s not showing any flags. (Though I wonder what the ‘@’ and ‘+’ signify. I read http://lists.apple.com/archives/Macos-x-server/2008/Jan/msg00138.html and played with xattr, but didn’t learn anything.)
Out of desperation, I tried sudo chflags nouchg /Volumes and sudo chflags nouchg /Volumes/ubuntu but still go the “Operation not permitted” error.
It’s possible that your user account is not able to mount volumes into the /Volumes directory directly. Have you tried mounting sshfs into a directory within your own home directory?
Failing that, you might need to have administrative (sudo) permissions to run sshfs. Try prefacing that command with sudo like so:
sudo sshfs daryls:/ /Volumes/daryls -oauto_cache,reconnect,volname=daryls
As an aside: to determine whether your Mac is running in 64-bit mode:
- Choose About This Mac from the Apple menu.
- Click More Info.
- Select Software in the Contents pane.
- Look for “64-bit Kernel and Extensions: Yes (or No)” under the System Software Overview heading.
Check more discussion of this question.
Related posts:
- rsync “Operation not permitted”
- How and when should I mount a remote filesystem using SSHFS?
- Is it possible to set the cache size for fuse and/or sshfs?
- Dovecot, getting error: Mail access for users with UID 222 not permitted
- Advantages/Disadvantages for using a single volume / drive letter for Windows Server installs
Leave a comment
Recent Posts
- Cron expression that runs every 5 minutes from 1:30 am – 6:00 am [duplicate]
- Understanding redundant power supplies
- Is there a way for administrators to disable users from installing Firefox extensions?
- Is there research material on NTP accuracy available?
- How to create a limited “domain admin” that does not have access to domain controllers?





