fuse4x / sshfs

GNU General Public License v2.0
41 stars 4 forks source link

Error code -36 #2

Closed tristan-k closed 12 years ago

tristan-k commented 12 years ago

I recently downgrade to Snow Leopard 10.6.8. After all the problems with macfuse on Lion I tought I would be safe with this Mac OS X Version but I was wrong. I use sshfs a lot because this is the the way I transfer files to my iOS devices.

Here is what I encountered: Reading files from sshfs is possible but writing results in a finder error:

The Finder can't complete the operation because some data in "File" can't be read or written. (Error code -36).

Does any one have a similair problem or some suggestions?

$ brew list antlr faac git imagemagick leptonica libgphoto2 libunistring little-cms rlog tre boost ffmpeg glib jasper libexif libicns libusb pkg-config scantailor wine cmake fuse4x gnutls jbig2enc libffi libogg libusb-compat popt sshfs x264 confuse fuse4x-kext gphoto2 jpeg libgcrypt libtasn1 libvorbis qt tesseract xvid encfs gettext htop lame libgpg-error libtiff libvpx readline theora yasm

$ sudo mkdir /Volumes/iPhone; sudo sshfs -o noappledouble -o allow_other -o defer_permissions -o volname=iPhone mobile@192.168.178.23:/var/mobile /Volumes/iPhone/

tristan-k commented 12 years ago

I mounted the volume again with the debug flag. The file I tried to copy was named "testfile.ipa".

$sudo mkdir /Volumes/iPhone; sudo sshfs -d -o noappledouble -o allow_other -o defer_permissions -o volname=iPhone mobile@192.168.178.23:/var/mobile /Volumes/iPhone/ FUSE library version: 2.8.6 nullpath_ok: 0 mobile@iphone's password: unique: 0, opcode: INIT (26), nodeid: 0, insize: 56 INIT: 7.16 flags=0x00000000 max_readahead=0x00100000 INIT: 7.16 flags=0x00000010 max_readahead=0x00100000 max_write=0x00010000 unique: 0, success, outsize: 40 unique: 1, opcode: OPENDIR (27), nodeid: 1, insize: 48 unique: 1, success, outsize: 32 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: GETXATTR (22), nodeid: 1, insize: 77 unique: 1, error: -78 (Function not implemented), outsize: 16 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, opcode: RELEASEDIR (29), nodeid: 1, insize: 64 unique: 1, success, outsize: 16 unique: 1, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 1, success, outsize: 136 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, success, outsize: 96 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 52 LOOKUP /mach_kernel getattr /mach_kernel unique: 1, success, outsize: 96 unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, success, outsize: 96 unique: 0, success, outsize: 96 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 52 LOOKUP /mach_kernel getattr /mach_kernel unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /autoexec.bat getattr /autoexec.bat unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 45 LOOKUP /DCIM getattr /DCIM unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 56 LOOKUP /.Spotlight-V100 getattr /.Spotlight-V100 unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 62 LOOKUP /.metadata_never_index getattr /.metadata_never_index unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 62 LOOKUP /.metadata_never_index getattr /.metadata_never_index unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, success, outsize: 96 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 57 LOOKUP /Backups.backupdb getattr /Backups.backupdb unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: OPENDIR (27), nodeid: 1, insize: 48 unique: 0, success, outsize: 32 unique: 1, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 1, success, outsize: 136 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, success, outsize: 96 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 1, success, outsize: 400 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 0, success, outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 54 LOOKUP /.bash_history getattr /.bash_history NODEID: 2 unique: 1, success, outsize: 160 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 49 LOOKUP /.forward getattr /.forward NODEID: 3 unique: 0, success, outsize: 160 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /Applications getattr /Applications NODEID: 4 unique: 1, success, outsize: 160 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 50 LOOKUP /Documents getattr /Documents NODEID: 5 unique: 0, success, outsize: 160 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 48 LOOKUP /Library getattr /Library NODEID: 6 unique: 1, success, outsize: 160 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 46 LOOKUP /Media getattr /Media NODEID: 7 unique: 0, success, outsize: 160 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 49 LOOKUP /Received getattr /Received NODEID: 8 unique: 1, success, outsize: 160 unique: 0, opcode: LOOKUP (1), nodeid: 1, insize: 48 LOOKUP /appsync getattr /appsync NODEID: 9 unique: 0, success, outsize: 160 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /iCaughtU Pro getattr /iCaughtU Pro NODEID: 10 unique: 1, success, outsize: 160 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, success, outsize: 96 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 0, success, outsize: 400 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 1, success, outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, success, outsize: 96 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 48 LOOKUP /.hidden getattr /.hidden unique: 0, success, outsize: 96 unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 0, success, outsize: 400 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 1, success, outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 1, success, outsize: 136 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, success, outsize: 96 unique: 1, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 1, success, outsize: 136 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 0, success, outsize: 400 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 1, success, outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 2, insize: 56 getattr /.bash_history unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 3, insize: 56 getattr /.forward unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 4, insize: 56 getattr /Applications unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 5, insize: 56 getattr /Documents unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 6, insize: 56 getattr /Library unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 7, insize: 56 getattr /Media unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 8, insize: 56 getattr /Received unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 9, insize: 56 getattr /appsync unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 10, insize: 56 getattr /iCaughtU Pro unique: 0, success, outsize: 136 unique: 1, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 4, insize: 56 getattr /Applications unique: 0, success, outsize: 136 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 5, insize: 56 getattr /Documents unique: 0, success, outsize: 136 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /testfile.ipa getattr /testfile.ipa unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /testfile.ipa getattr /testfile.ipa unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: CREATE (35), nodeid: 1, insize: 69 create flags: 0x202 /testfile.ipa 0100644 umask=0000 create[2142768] flags: 0x202 /testfile.ipa fgetattr[2142768] /testfile.ipa NODEID: 11 unique: 1, success, outsize: 176 unique: 0, opcode: GETATTR (3), nodeid: 11, insize: 56 getattr /testfile.ipa unique: 0, success, outsize: 136 unique: 1, opcode: FLUSH (25), nodeid: 11, insize: 64 flush[2142768] unique: 1, success, outsize: 16 unique: 0, opcode: RELEASE (18), nodeid: 11, insize: 64 release[2142768] flags: 0x0 unique: 0, success, outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 1, insize: 53 LOOKUP /testfile.ipa getattr /testfile.ipa NODEID: 11 unique: 1, success, outsize: 160 unique: 1, opcode: SETXATTR (21), nodeid: 11, insize: 109 unique: 1, error: -78 (Function not implemented), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, success, outsize: 96 unique: 0, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 0, success, outsize: 96 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 1, success, outsize: 440 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 0, success, outsize: 16 unique: 1, opcode: GETATTR (3), nodeid: 2, insize: 56 getattr /.bash_history unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 3, insize: 56 getattr /.forward unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 4, insize: 56 getattr /Applications unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 5, insize: 56 getattr /Documents unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 6, insize: 56 getattr /Library unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 7, insize: 56 getattr /Media unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 8, insize: 56 getattr /Received unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 9, insize: 56 getattr /appsync unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 10, insize: 56 getattr /iCaughtU Pro unique: 1, success, outsize: 136 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 11, insize: 56 getattr /testfile.ipa unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 1, insize: 56 getattr / unique: 0, success, outsize: 136 unique: 1, opcode: STATFS (17), nodeid: 1, insize: 40 statfs / unique: 1, success, outsize: 96 unique: 0, opcode: READDIR (28), nodeid: 1, insize: 80 getdir[0] unique: 0, success, outsize: 440 unique: 1, opcode: READDIR (28), nodeid: 1, insize: 80 unique: 1, success, outsize: 16 unique: 0, opcode: GETATTR (3), nodeid: 2, insize: 56 getattr /.bash_history unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 3, insize: 56 getattr /.forward unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 4, insize: 56 getattr /Applications unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 5, insize: 56 getattr /Documents unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 6, insize: 56 getattr /Library unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 7, insize: 56 getattr /Media unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 8, insize: 56 getattr /Received unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 9, insize: 56 getattr /appsync unique: 1, success, outsize: 136 unique: 0, opcode: GETATTR (3), nodeid: 10, insize: 56 getattr /iCaughtU Pro unique: 0, success, outsize: 136 unique: 1, opcode: GETATTR (3), nodeid: 11, insize: 56 getattr /testfile.ipa unique: 1, success, outsize: 136 unique: 0, opcode: LOOKUP (1), nodeid: 4, insize: 51 LOOKUP /Applications/.localized getattr /Applications/.localized unique: 0, error: -2 (No such file or directory), outsize: 16 unique: 1, opcode: LOOKUP (1), nodeid: 5, insize: 51 LOOKUP /Documents/.localized getattr /Documents/.localized unique: 1, error: -2 (No such file or directory), outsize: 16

anatol commented 12 years ago

Please upgrade fuse4x to the latest version (0.8.14)

anatol commented 12 years ago

Before going deeper into kext debugging there are few things to note in your example. Your run sshfs as "sudo mkdir /Volumes/iPhone; sudo sshfs -o noappledouble -o allow_other -o defer_permissions -o volname=iPhone mobile@192.168.178.23:/var/mobile /Volumes/iPhone/"

1) You don't have to mount your filesystem as root. It is recommended to mount it as a regular user: "sshfs -o noappledouble -o allow_other -o defer_permissions -o volname=iPhone mobile@192.168.178.23:/var/mobile /Volumes/iPhone/", just make sure that /Volumes/iPhone/ is owned by you.

2) -o allow_other is also not needed unless you want other uses access mounted directory.

3) This page http://mikota.posterous.com/solution-to-finder-error-code-36-in-106-when says that "error -36" is related to permissions for apple dot files. Could you please check remove "defer_permissions" option and see if the error still exist. If it does please remove "noappledouble" as well.

At the end you should have "sshfs -o volname=iPhone mobile@192.168.178.23:/var/mobile /Volumes/iPhone/", let me know if wil this command line the problem still exist.

anatol commented 12 years ago

ping?

chmielot commented 12 years ago

I had the same problem and your solution anatol, worked great for me! But after unmounting, why is my mountpoint folder removed which I created with mkdir and changed owner to my regular user?

anatol commented 12 years ago

I had the same problem and your solution anatol, worked great for me!

What exactly step fixed the issue? I suspect that removing "-o noappledouble" fixes it.

But after unmounting, why is my mountpoint folder removed

Honestly I do not know why. I usually mount to folders in my HOME dir (like here http://blog.philippklaus.de/2011/07/sshfs-on-mac-os-x-10-6-8-with-fuse4x/) and the folders never get removed.

Fuse4X does not remove mount folders, it comes from macosx internals (DiskManagementTool.framework maybe?), and its wisdom is not clear to me. I believe google.com should have some information about it. Let me know if you find anything.

chmielot commented 12 years ago

yes, removing noappledouble fixes it. But now I have .DS_Store files.

Couldn't find a solution for the mountpoints being removed. :(

anatol commented 12 years ago

But now I have .DS_Store files.

Check this blog article http://blog.philippklaus.de/2011/07/sshfs-on-mac-os-x-10-6-8-with-fuse4x/ part "Preventing the creation of .DS_Store files on network drives mounted via SSHFS". Let me know if it works for you.

chmielot commented 12 years ago

Unfortunately this didn't work for me. I'm still having DS_Store files.

anatol commented 12 years ago

I am trying to revise the issue as a have a few idea what it might cause the issue. I am trying to repro it. I mount the folder with "sudo sshfs -d -o noappledouble -o allow_other -o defer_permissions ..." but writing files works fine for me.

Are you still able to reproduce the issue?

cby016 commented 11 years ago

Are there any updates on this issue? I would like to use both the defer_permissions and noappledouble options but when I do I get the "error code -36" error.

I ran "defaults write com.apple.desktopservices DSDontWriteNetworkStores true" to not get the DS_Store files but whenever I copy a file to an sshfs drive I get an extra hidden file in this format ._filename. Any help would be appreciated.