sshfs and target directory
summary:
sshfs mounting user@host: works but user@host:/ does not.
I had to apply this patch:
modules/parse_sun.c +1 -1
@@ -827,7 +827,7 @@ static int validate_location(char *loc) *ptr =='-' || *ptr =='.' || *ptr =='_' || *ptr ==',' || *ptr =='(' || *ptr ==')' || *ptr =='#' || *ptr =='@' || *ptr ==':' || - *ptr == '[' || *ptr == ']')) + *ptr == '[' || *ptr == ']' || *ptr == '/' )) return 0; ptr++; }
in order to make this work which doesn't mount /root but /
rootlap -fstype=fuse,rw,nodev,nonempty,noatime,max_read=65536,uid=1008,gid=100 \/nix\/store\/yfmbrb7d7hh9n6dyidypw7k1xcixxmmz-sshfs-wrapped\/bin/\sshfs-wrapped\#root@host\:\/
I'm not sure whether this is the perfect patch.
Probably the problem is that the trailing :/ triggers check_colon to return 1 in validate_location which is then failing in the loop I patched above because "/" was not a valid character.
Marc Weber
Ian Kent
maintainerQuoted 24 lines · Marc Weber
summary:
sshfs mounting user@host: works but user@host:/ does not.
I had to apply this patch:
modules/parse_sun.c +1
-1@@ -827,7 +827,7 @@ static int validate_location(char *loc) *ptr =='-' || *ptr =='.' || *ptr =='_' || *ptr ==',' || *ptr =='(' || *ptr ==')' || *ptr =='#' || *ptr =='@' || *ptr ==':' || - *ptr == '[' || *ptr == ']')) + *ptr == '[' || *ptr == ']' || *ptr == '/' )) return 0; ptr++; }in order to make this work which doesn't mount /root but /
Quoted 7 lines
rootlap -fstype=fuse,rw,nodev,nonempty,noatime,max_read=65536,uid=1008,gid=100 \/nix\/store\/yfmbrb7d7hh9n6dyidypw7k1xcixxmmz-sshfs-wrapped\/bin/\sshfs-wrapped\#root@host\:\/
I'm not sure whether this is the perfect patch.
Probably the problem is that the trailing :/ triggers
check_colonto return 1 invalidate_locationwhich is then failing in the loop I patched above because "/" was not a valid character.
Yes, this has come up recently and it's a bit painful.
If *ptr is a "/" then that is not valid in this case so we can do that.
But if you add a ":" escape to the beginning of the mount location this check will not be made. I can't remember the sshfs syntax but something like :sshfs#<user>@<host: should work OK.
Ian
Quoted 7 lines
Marc Weber
_______________________________________________
autofs mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/autofs
Sry, I missed posting this mail to the list in the first place. Doing so now. Additional note:
[email protected] bounced as well so I don't know how to contact the maintainer of the official howto.
Quoted 6 lines
You asked about where we can put example scripts before.
I add a contrib directory to the distribution but there isn't a web site. I have the domain name autofs.net but I don't have the time or inclination to put together and maintain a web site. Last I I posted to the list hinting at wanting someone interested in doing this I didn't get any responses.
I must have missed that.
I think it's bad that many people start blogging about autofs because tehre is no uniq place to look for information.
So if you can setup any wiki (which shoud be done in 5 min) I'll try to put up at least pointers to
a) the mailinglist archives
http://linux.kernel.org/pipermail/autofs
b) the howto
http://www.linux-consulting.com/Amd_AutoFS/autofs.html
(I sent in email to Alvin. But I had to search for the newer mail address on this list..)
c) my script ;-)
d) Whatever you think is missing.
But in this case adding that line to the man page would have been enough :)
If you think it's worth starting a small wiki just for keeping things in one place let me know about your server features and I'll try to find a wiki which can be run on it.
Marc Weber