Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

Map users UID while mounting a file system over ssh / sshfs / fuse

Date: 2011-05-01 00:00:00 -0400

Introduction

You can use sshfs, to mount a remote file system on your local computer over ssh, then you can work with it as it were your local file system (provided you have enough bandwidth :) ).

But you may run into permissions problems, to solve that, use the option idmap

Mounting remote file system over ssh, and mapping users

From the man page:

-o idmap=TYPE user/group ID mapping, possible types are: none: no translation of the ID space (default) user: only translate UID of connecting user

So, if you want to map the user UID between the two PCs, let’s run something like this:

sshfs -o idmap=user 10.1.1.10:/remotedir ~/localdir

That simple option will save you time guessing why you have permission problems while mounting the remote filesystem over ssh.

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.