Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect mapping from local storage to remote storage #298

Closed
fungtion opened this issue Mar 20, 2024 · 4 comments
Closed

Incorrect mapping from local storage to remote storage #298

fungtion opened this issue Mar 20, 2024 · 4 comments

Comments

@fungtion
Copy link

Hi, I install sshfs on local machine A, and I create a link to /data in my home. Then I use sshfs to mapping the remote machine B to machine A, and B also has a link to its /data in its home. When I open the /data of B, I find it actually points to /data of A, can you help me to get the correct mapping?

@h4sh5
Copy link
Collaborator

h4sh5 commented Mar 24, 2024

Can you describe the commands you ran on each machine please?

@fungtion
Copy link
Author

on machine A:

  • create link to /data in home directory: cd ~ && ln -s /data
  • mount machine B to /mnt/b: sudo mkdir /mnt/b && sudo sshfs -o allow_other,default_permissions user_B@ip_B:/home/user_B /mnt/b
  • create link to /mnt/b in home directory: sudo chmod 777 /mnt/b && cd ~ && ln -s /mnt/b

On machine B:

  • create link to /data in home directory: cd ~ && ln -s /data

Then when I open ~/b/ on A, I find this folder is actually points to /data of A instead of B

@bfleischer
Copy link
Collaborator

In case you are on macOS, the mount option jail_symlinks might be what you are looking for. When specifying jail_symlinks, all absolute symlinks on the mounted volume are prefixed with the mount point of the volume.

@fungtion
Copy link
Author

@bfleischer Thanks, I'm on Ubuntu, after I add -o follow_symlinks, it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants