Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Goal
I want to mount my server root at /mnt/server
Root should be able to edit files
bob (uid1000 on both sides) should be able to edit files.
root should be root
bob should be bob. No messing with UIDs.
=============================
Bob mounts the FS:
sshfs root@myserver:/ /mnt/server -o default_permissions,idmap=none
------------------------
This does not achieve the above goal.
I've also tried allow_other and allow_root options.
For some reason these options are mutually exclusive.
--------------------
No combination of options resulted in bob being able to touch a file on the server, and have it owned by bob.
It seems bob needs to connect to the server as bob@myserver mounted as /mnt/server-bob
Then root needs to connect to root@myserver and mount at /mnt/server-root
This seems a bit silly?
If I want to edit files as john (uid1001) I need to make another ssh account for john, and have john connect at john@myserver and mount at /mnt/server-john
The only alternative I can think of is NFS over VPN?
on my pc root login via ssh is disabled because its stupid. perhaps your server doesnt allow it either ?
edit: i think i am misunderstanding something since it is implied above that you are able to ssh into the server as root (even though it is stated that this does not work).
Generally it's not possible to use an sshfs mount as a "real" filesystem shared between multiple users. Some of this functionality can be enabled with the -o allow_other and -o default_permissions options, but files will not be created with the correct ownership, etc...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.