Userspace file systems are one of the coolest storage options in Linux. They allow really creative file systems to be developed without having to go through the kernel gauntlet. This article presents one of them, SSHFS, that allows you to remotely mount a file system using ssh (sftp).
I have a machine on which I wish to mount multiple remote servers to access them all centrally. For remote Linux based systems I am using SSHFS which works fine.
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
Published at LXer:
I edited the file /etc/rc.d/rc.local and added the following lines in order to mount a remote directory through sshfs at boot time:
su user -c "/usr/bin/sshfs -o idmap=user -o reconnect -o allow_other -o uid=500 -o gid=500 user@remote:/home/shares/allusers /home/user/mnt"
The problem is that is not mounting the directory on startup but when I execute this command manually after logging in ever
Have you ever wanted to look inside a tar.gz file but without expanding it? Have you ever wanted to just dump files in a .tar.gz file without having to organize it and periodically tar and gzip this data? This article presents another REALLY useful user-space file system, archivemount.
I would like to define local ACL's to be used over a remotely mounted filesystem.
The filesystem is mounted via autofs and sshfs FUSE.
The idea is that we could setup a jailed user on a jump server with access to read files on other servers in the environment and use standard commands without alot of exposure and certainly without granting ssh access.
Problem is sshfs will always run as the same
I'm trying to mount a remote disk using sshfs. The code is:
sshfs user@server:/ /home/user/folder
The problem could be that the remote server relogins the connecting user under a different user upon login. And therefore when i try to use this code it doesn't mount and gives me no error. How can i deal with it?
Ubuntu 11.04, server is Debian
Edit:
About relogging.
Having file systems in the kernel has its pros and cons. Being able to write file systems in user-space also has some pros and cons, but FUSE (File System in Userspace) allows you to create some pretty amazing results. This article takes a very brief look at user-space file systems and FUSE.