if I mount a sshfs point as root and use the option allow_other then on the original server (SERVERA) the files are owned by the SSH user, and on the destination server (SERVERB) are accessible (writable) by everyone.

Is it possible instead to do the mount in a way that, on SERVERB, I can preserve ownership and permission metadata?

For example, let's say that I have a user bob, I create (as root) a folder, I chown it to bob and then bob can manage his own files as if they would be on a local disk.

I am interested in a new empty share, so preserving of old data to match users on the server is not important for me.

(PS: What's the difference between unix.stackexchange.com and serverfault.com ?)

  • I may be wrong, but perhaps you are looking for NFS? Check it out...
    – Jan
    Dec 6, 2017 at 14:14
  • @Jan thanks, but that's protocol is not supported by my "data space" provider
    – Antonello
    Dec 6, 2017 at 14:19
  • 1
    serverfault.com is site for server administration problems while unix.stackexchange.com is site for general purpose unix-like system problems.
    – frams
    Dec 6, 2017 at 15:50

1 Answer 1


The first solution that comes to mind for me is to use posixovl. It's a FUSE module (just like SSHFS is) that provides a POSIX compliant VFS layer on top of another filesystem. It works by storing info about ownership and permissions (and other such things) in a file in the underlying filesystem. While it was originally designed to provide a way to get POSIX semantics on FAT filesystems, it should work just fine for this too (barring any possible issues from stacking FUSE modules on top of each other).

Alternatively, if your storage provider offers SMB/CIFS access, see if they support the CIFS UNIX extensions (though only do this if you are talking over a secure network and trust both endpoints, CIFS is a variant of SMB 1.0, and it includes all the potential security issues that that entails).

  • Thank you. At the end I employed a different solution that gave me even more flexibility (at the cost of higher complexity): I mounted the volume trough sshfs, delegated the user/permission/share/versioning to a higher level (using a specific application, nextcloud) and let this app to act as filesystem provider trough webdav that individual users mount using davfs2.
    – Antonello
    Dec 11, 2017 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .