3

I installed Rust from the rustlang.org website. I tried to look at the Book:

rustup doc --book

This results in an "Access to the file was denied" error in Firefox.

I assumed this was a snap issue, and asked in their forum. Got crickets.

So, I'm asking here. Maybe someone has figured out how to make Firefox open /home/me/.rustup/whatever.

Here is the output of snap connections | grep personal-files:

personal-files            firefox:dot-mozilla-firefox     :personal-files                  -

Here is a screenshot of Firefox telling me it cannot access the file...

Firefox error message

ikmac
  • 1,353
  • 3
  • 12
  • 18
  • 1
    https://doc.rust-lang.org/stable/book/ works for me with chromium. – chili555 Jul 20 '22 at 01:34
  • @chili555 The website works fine for me too. `rustup doc` does not. That is my question. – ikmac Jul 20 '22 at 01:43
  • Your output of `snap connections | grep personal-files` is both correct and matches the default setting. Your Firefox snap DOES have permission to access hidden files in your /home dir. I think we need the complete, exact error message. – user535733 Jul 20 '22 at 03:09
  • What is the output of `ls -laR /home/iain/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/share/doc/rust/html/` ? – Frankie0p Jul 20 '22 at 14:36
  • 1
    The output of ls -laR is pretty long, there's lots of files and directories under there. In short, all the directories, starting with /home/iain/.rustup are owned by iain:iain, and have mode 775. All the files (html, woff2, js, css, etc, etc) are owned by iain:iain and have mode 644. Ask me again if you're looking for other info and really need 39000 lines of output to peruse. :) – ikmac Jul 20 '22 at 19:31
  • 1
    This is getting tiresome. Folks on the snapcraft.io forum suggested I use CTRL-O to open individual files. But links don't work. I have to write down where the link goes and use CTRL-O to open the next page. – ikmac Jul 22 '22 at 02:16
  • I tried reinstalling snap firefox in classic mode, but that doesn't work because the snap is intrinsically strictly confined. – Bram Geron Feb 05 '23 at 17:40

1 Answers1

1

This does not work because the Firefox snap is not allowed access to ~/.rustup, which is a 'hidden' directory because it starts with a dot.

As a workaround, you can do the following to move the real location of ~/.rustup somewhere else. In this case we are moving it to ~/etc/rustup.

Execute the following in a terminal.

  1. mkdir -p ~/etc
  2. mv ~/.rustup ~/etc/rustup
  3. ln -s ~/etc/rustup ~/.rustup

Now rustup doc should work transparently.

Bram Geron
  • 223
  • 2
  • 14