This repository has been archived by the owner on Nov 29, 2024. It is now read-only.
sshfs exits with code 1 and no error message in some situations when option idmap=file is used #6
Open
Description
This was tested on systems with these version combinations:
- (standard Ubuntu 22.04): sshfs=3.7.1, fuse=3.10.5, kerneliface=7.31
- manually installed sshfs/fuse: sshfs=3.7.3, fuse=3.14.0, kerneliface=7.38
Initial setup:
- create two subdirectories somewhere, "server" and "client". I did this in $HOME/tmp
- create a file "test1.txt" in server, owned by current user and main group of user
- create file uidfile with only line
CURUSER:CURUID
, in my casejohann:1000
- create file gidfile with only line
MAINGRP:GRPID
in my casejohann:1000
Now:
- run:
sshfs -d localhost:/home/johann/tmp/server /home/johann/tmp/client -o idmap=file,uidfile=uidfile,gidfile=gidfile
- Option -d makes it easy to see if the command exits or keeps running ...
- THIS WORKS!
Modification 1:
- replace the groupname/id in gidfile with another group, even one the user is in (so the combination is legal, but not the primary group of the user). Run the same command again:
- DOES NOT WORK, exits with exit code 1 without any error message!
Modification 2:
- same as Modification 1, but run with added parameter
nomap=ignore
- This works, does not exit!
Modification 3:
- same as initial setup
- but update uidfile to contain the wrong user id
- again, if nomap is ignore, this works, otherwise it does NOT work and exits without error message.
Obvervation:
- it seems that whenever the primary group of the user does not get mapped correctly AND no nomap parameter is specified or nomap=error, then the command exits without error message and with exit code 1
- so the real bug here is that no error message is written when some problem with uids or gids from the files is encountered
- This makes it hard to figure out initially what is going on at all (in the standard situation, without the -d flag, one expects the sshfs command to immediately return, but nothing is mounted)
- Even after one becomes aware that the problem might be related to the uid/gid files, it is very hard to figure out which of those is to blame and which setting or missing setting is responsible for the problem
Metadata
Assignees
Labels
No labels