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

ls: Operation not permitted #56

Closed cybersn-tdeyarmin closed 4 years ago

cybersn-tdeyarmin commented 4 years ago

Attempting to run any commands on a sshfs mounted directory returns an error for any user. I'm sure it's something with my configuration but I'm struggling to figure out what it is. Any help would be appreciated.

For what it's worth, connecting with sftp does allow me to list directories and get files.

Server: sshd_config:

Subsystem       sftp    internal-sftp

Match Group groupname
  ForceCommand internal-sftp
  PasswordAuthentication no
  ChrootDirectory /some/directory
  PermitTunnel no
  AllowAgentForwarding no
  AllowTcpForwarding no
  X11Forwarding no
drwxr-xr-x 7 root groupname 4096 May 20 19:40 /some/directory

Mac Client:

sudo sshfs -oIdentityFile=/User/foo/.ssh/identity,allow_other,default_permissions  user@server: /mount/point

mount
user@server: on /mount/point (osxfuse, synchronous)

ls /mount/point
ls: point: Operation not permitted

sudo ls /mount/point
ls: point: Operation not permitted

Same error with other commands: touch, mkdir, du

sshfs --version
SSHFS version 2.10
OSXFUSE 3.10.4
FUSE library version: 2.9.7
cybersn-tdeyarmin commented 4 years ago

Installing sshfs 2.5.0 fixed the issue. I had installed ssfhs from brew which gave me an older version.