Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Firefox won't open file:/// links

  • 11 回覆
  • 0 有這個問題
  • 75 次檢視
  • 最近回覆由 jonzn4SUSE

更多選項

I have a local file I wish to view in firefox without starting a HTTP server (it's only docs for a crate I'm building) however Firefox is unable to open the file despite the file existing and having correct permissions. The file was in a separate mount (disk) to where Ffox is installed so I copied to to /tmp/ to remove that as a variable but still no joy..

➜ ~ file /tmp/index.html /tmp/index.html: HTML document, Unicode text, UTF-8 text, with very long lines (3556) ➜ ~ ls -la /tmp/index.html -rwxr-xr-x 1 ben ben 4208 Dec 30 14:04 /tmp/index.html

Am I missing some new setting which allows local file browsing using the good old 'file:///' protocol?

Thanks, Ben

OS Info: PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble

F/Fox version: 146.0.1 (64-bit)

I have a local file I wish to view in firefox without starting a HTTP server (it's only docs for a crate I'm building) however Firefox is unable to open the file despite the file existing and having correct permissions. The file was in a separate mount (disk) to where Ffox is installed so I copied to to /tmp/ to remove that as a variable but still no joy.. ➜ ~ file /tmp/index.html /tmp/index.html: HTML document, Unicode text, UTF-8 text, with very long lines (3556) ➜ ~ ls -la /tmp/index.html -rwxr-xr-x 1 ben ben 4208 Dec 30 14:04 /tmp/index.html Am I missing some new setting which allows local file browsing using the good old 'file:///' protocol? Thanks, Ben OS Info: PRETTY_NAME="Ubuntu 24.04.3 LTS" NAME="Ubuntu" VERSION="24.04.3 LTS (Noble Numbat)" VERSION_CODENAME=noble F/Fox version: 146.0.1 (64-bit)
附加的畫面擷圖

所有回覆 (11)

更多選項

I save this page and moved it into the (on a mac) /private/tmp directory and was able to open the file. see screenshot Let me get on linux and repeat the steps and see what happens.

更多選項

Ah I have just done that and saved the payload into my home folder and Firefox opens it without issue. Also copied my generated docs to my home folder and that also opens. So this does look related to some higher-level directory permissions.

Oddly though both /tmp and /opt (where the docs are actually being generated) have read/execute permissions for all users so I'm struggling to find why Firefox cannot navigate those dirs.

更多選項

Look at or tail -f the logs and see what's there when you try to access that file.

更多選項

My money is on permissions. Going to linux now. I fogot about this issue.

更多選項

Done. see screenshots


Operating System: openSUSE Tumbleweed 20251229 KDE Plasma Version: 6.5.4 KDE Frameworks Version: 6.21.0 Qt Version: 6.10.1 Kernel Version: 6.18.2-1-default (64-bit) Graphics Platform: X11 Processors: 16 × AMD Ryzen 7 5825U with Radeon Graphics Memory: 64 GiB of RAM (62.1 GiB usable) Graphics Processor: AMD Radeon Graphics Manufacturer: HP Product Name: HP ProBook 455 15.6 inch G9 Notebook PC

由 jonzn4SUSE 於 修改

更多選項

Saving this page is not just a single .html file, but a directory of files. What is that file you're trying to access and how was it generated. Looking like it's not a browser issue, but a file issue.

更多選項

Just for S&Gs I made my index.html file and placed in /tmp. see screenshot

更多選項

It's just documentation for a rust crate (generated via `cargo doc` command). Dumps out a directory of loose html/js/images etc.

/tmp has the sticky bit set but firefox is running as my local user so I would expect it can see my other files. What firefox reports in /tmp and what is really on the filesystem are wildly different.

I have even copied the directory out to root '/' to test outside of a folder with sticky bit and the root view in firefox cannot see the folder.

➜ / ls -lad rusty_reactor drwxrwxrwx 6 ben ben 144 Dec 31 16:40 rusty_reactor

Maybe firefox is running in some sort of chroot / virtual filesystem?

更多選項

Yet works fine if I copy it to my home directory... Very odd

更多選項

Great, so you know it's not a browser issue, but still Interesting... Try the same steps with your OS via a live usb stick and see what happens. May the schwartz be with you.

Jones out!!!

由 jonzn4SUSE 於 修改

更多選項

I forgot to ask my basic linux question... X11 or wayland? I'm not dev, but it could matter. What desktop?

由 jonzn4SUSE 於 修改

問個問題

如果您還沒有帳號,您必須先登入帳號 來回覆文章。還沒有帳號的話,只能發問新問題