Skip to content
This repository has been archived by the owner. It is now read-only.

FUSE mountpoint mini-FAQ #188

Closed
ghost opened this issue Oct 22, 2016 · 1 comment
Closed

FUSE mountpoint mini-FAQ #188

ghost opened this issue Oct 22, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Oct 22, 2016

I'm gathering together a few pieces of info on the FUSE interface here to hopefully save others the head-scratching it caused me. It can seem nonsensical or even broken at first glance, but it does actually work as intended once you know why certain things happen.

ipfs mount takes a really long time

The mount process tries to resolve /ipns/local on the filesystem to whatever you've put in ipfs name publish previously, which may end up timing out or incurring network delays for whatever reason.

One way to avoid that is re-running your last publish command, or putting the empty node there if you don't care (ipfs name publish QmUNLLsPACCz1vLxQVkXqqLX5R1X345qqfHbsf67hvA3Nn).

ls -l showing question marks for the mountpoints

FUSE on Linux is strict by default, and won't let users see each other's mountpoints at all. Even if you're root:

~ # ls -l /mnt/ipfs/
ls: cannot access '/mnt/ipfs/ipfs': Permission denied
ls: cannot access '/mnt/ipfs/ipns': Permission denied
total 2
d????????? ? ?           ?           ?            ? ipfs
d????????? ? ?           ?           ?            ? ipns

To override that you need to put user_allow_other in /etc/fuse.conf, and on the IPFS side do ipfs config --json Mounts.FuseAllowOther true. No need to restart the daemon, just umount them and then ipfs mount again.

ls -l showing weird permissions

Supposing you've just got past the previous point, now you'll see something like this:

d--x--x--x 1 root        root        0 Oct 21 19:49 ipfs
d--x--x--x 1 root        root        0 Oct 21 19:49 ipns

Read permission isn't set or needed here because that's for reading the directory, not accessing files within it. That's what the +x does. Reading a directory that can contain any valid ipfs hash would be impossible unless you were on a controlled, closed network.

The /ipns mountpoint

I'd recommend not using this — go umount ipns and use the ipfs name commands instead. But if you still want to…

  • /ipns/local is a symlink pointing to your node's local ID, so you can readlink it to get at that easily.
  • /ipns/${Your ID} is a visible directory you can write to. Or sometimes it's a file. It depends what you last published using the CLI. You can't switch between the two types from this interface.
  • Deleting files from the directory is possible but the deletions won't stick.
  • If it's a file, most operations will malfunction.
  • /ipns/${Someone Else's ID} will behave as a symlink, but doesn't currently resolve correctly.
@flyingzumwalt
Copy link
Contributor

flyingzumwalt commented May 23, 2017

This issue was moved to https://discuss.ipfs.io/t/fuse-mountpoint-mini-faq/312

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

No branches or pull requests

1 participant