libfuse/sshfs

QT Creator fails to save file

Closed this issue · 1 comments

I have mounted remote directory with SSHFS on Mac running latest Mac OS Moterey macOS 12.0.1 (21A559). I can edit and save files on the mounted directory using vi editor, I can also open files in Qt Creator 5.0.2 (Based on Qt 5.15.2 (Clang 11.0 (Apple), 64 bit)), but I am getting following error when I try to save file:

"Error while saving file: Cannot write file /Users/client_username/dbm/1.txt: Function not implemented"

I already tried "-o allow_other", and all "workaround=", but no success.

Any help is appreciated,
Thanks

NVP-Mac:~ $ sshfs -o debug,sshfs_debug -o allow_other,workaround=all -o volname=dbm,reconnect serverusername@dbm.xxxxxxx.com:/usr/home/serverusername /Users/clientusername/dbm
SSHFS version 2.5
FUSE library version: 2.9.9
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <-X> <-a> <-oClearAllForwardings=yes> <-2> serverusername@dbm.xxxxxxx.com <-s>
Server version: 3
Extension: posix-rename@openssh.com <1>
Extension: statvfs@openssh.com <2>
Extension: fstatvfs@openssh.com <2>
Extension: hardlink@openssh.com <1>
unique: 2, opcode: INIT (26), nodeid: 0, insize: 56, pid: 4961
INIT: 7.19
flags=0xee000008
max_readahead=0x00100000
remote_uid = 1019
INIT: 7.19
flags=0x00000010
max_readahead=0x00100000
max_write=0x02000000
max_background=0
congestion_threshold=0
unique: 2, success, outsize: 40
unique: 3, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 4961
statfs /
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 0
[00002] EXTENDED
statfs /
[00003] EXTENDED
[00002] EXTENDED_REPLY 97bytes (49ms)
unique: 3, success, outsize: 96
[00003] EXTENDED_REPLY 97bytes (49ms)
unique: 2, success, outsize: 96
unique: 3, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 112
statfs /
[00004] EXTENDED
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 159
statfs /
[00005] EXTENDED
[00004] EXTENDED_REPLY 97bytes (22ms)
[00005] EXTENDED_REPLY 97bytes (22ms)
unique: 3, success, outsize: 96
unique: 2, success, outsize: 96
unique: 3, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 159
statfs /
[00006] EXTENDED
unique: 2, opcode: ACCESS (34), nodeid: 1, insize: 48, pid: 109
access / 00
unique: 2, error: -78 (Function not implemented), outsize: 16
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 109
getattr /
[00007] LSTAT
[00006] EXTENDED_REPLY 97bytes (48ms)
[00007] ATTRS 41bytes (47ms)
unique: 3, success, outsize: 96
unique: 2, success, outsize: 136
unique: 3, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 159
statfs /
[00008] EXTENDED
[00008] EXTENDED_REPLY 97bytes (21ms)
unique: 3, success, outsize: 96
unique: 2, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 897
statfs /
.......
LOOKUP /1.txt
getattr /1.txt
[00062] LSTAT
[00062] ATTRS 41bytes (41ms)
NODEID: 3
unique: 18, success, outsize: 160
unique: 17, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 109
getattr /
unique: 17, success, outsize: 136
.......
......When I try to save file.......
.......
unique: 6, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 4899
getattr /
[00074] LSTAT
[00074] ATTRS 41bytes (21ms)
unique: 6, success, outsize: 136
unique: 8, opcode: GETATTR (3), nodeid: 3, insize: 56, pid: 4899
getattr /1.txt
[00075] LSTAT
[00075] ATTRS 41bytes (41ms)
unique: 8, success, outsize: 136
unique: 5, opcode: GETXATTR (22), nodeid: 3, insize: 77, pid: 4899
getxattr /1.txt com.apple.FinderInfo 32 0
unique: 5, error: -45 (Operation not supported), outsize: 16
unique: 4, opcode: LOOKUP (1), nodeid: 1, insize: 48, pid: 4899
LOOKUP /._1.txt
getattr /._1.txt
[00076] LSTAT
[00076] STATUS 33bytes (19ms)
unique: 4, error: -2 (No such file or directory), outsize: 16
unique: 7, opcode: GETXATTR (22), nodeid: 3, insize: 79, pid: 4899
getxattr /1.txt com.apple.ResourceFork 0 0
unique: 7, error: -45 (Operation not supported), outsize: 16
unique: 2, opcode: LOOKUP (1), nodeid: 1, insize: 48, pid: 4899
LOOKUP /._1.txt
getattr /._1.txt
[00077] LSTAT
[00077] STATUS 33bytes (20ms)
unique: 2, error: -2 (No such file or directory), outsize: 16
unique: 9, opcode: GETATTR (3), nodeid: 3, insize: 56, pid: 4899
getattr /1.txt
unique: 9, success, outsize: 136
unique: 3, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 4899
getattr /
unique: 3, success, outsize: 136
unique: 13, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 4899
statfs /
[00078] EXTENDED
[00078] EXTENDED_REPLY 97bytes (46ms)
unique: 13, success, outsize: 96
unique: 10, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 4899
statfs /
[00079] EXTENDED

Thanks for the report! It looks like QT Creator depends on extended attributes, which are not supported by SSHFS:

unique: 7, opcode: GETXATTR (22), nodeid: 3, insize: 79, pid: 4899 
getxattr /1.txt com.apple.ResourceFork 0 0
unique: 7, error: -45 (Operation not supported), outsize: 16

Patches welcome (but I'm not sure to what extend SFTP supports these at all).