I'm having the same problem as acampbell (see post #8 in
Chrome or Firefox).
Per jggimi's suggestion (see post #9 in
Chrome or Firefox), both
/tmp and
~/Downloads are ordinary directories. They are not symlinks.
From
/usr/local/share/doc/pkg-readmes/firefox:
Code:
pledge(2) and unveil(2) Support
===============================
Firefox on OpenBSD is secured with pledge(2) and unveil(2) to limit
the system calls and filesystem access that each of Firefox's three
process types (main, content, and GPU) is permitted. By default,
only ~/Downloads and /tmp can be written to when downloading files,
or when viewing local files as file:// URLs.
Files containing pledge promises and unveil paths and permissions
for each type of process are located in
/usr/local/lib/firefox/browser/defaults/preferences/.
Each file can be overridden by copying it to /etc/firefox/
and modifying it.
Viewing local files as
file:// URLs works as expected. The default configuration gives me access to
~/Downloads and
/tmp. Trying any other directory results in a "File not found" error.
Copying the configuration files to
/etc/firefox and modifying them also worked:
Code:
# Make a firefox directory in /etc
cd /etc
doas mkdir firefox
# Copy firefox default config files to /etc/firefox
cd /usr/local/lib/firefox/browser/defaults/preferences
doas cp unveil.content unveil.main /etc/firefox
# Modify the copied config files
cd /etc/firefox
# Open unveil.content and unveil.main with a text editor; add the line
# ~/Firefox r
# to each file
# Make a test directory containing a test file
cd $HOME
mkkdir Firefox
cd Firefox
vi FirefoxTEST.txt
# Type in some text and quit vi
After making these changes, I was able to view
FirefoxTEST.txt by typing
file:///home/gustaf/Firefox/FirefoxTEST.txt into the URL bar in Firefox.
So far, so good.
BUT, this does not work with any of the dialogue boxes (Open, Save, Upload, etc).
When I try, for example, to save a file with
File > Save Page As..., clicking
+ Other Locations in the left pane of the dialog brings up
Computer in the right pane. Clicking
Computer makes the right pane go blank. In the dialog boxes, my entire filesystem is invisible to Firefox. Given the instructions in
/usr/local/share/doc/pkg-readmes/firefox:
Code:
...By default, only ~/Downloads and /tmp can be written to when downloading files...
I would think that the dialog boxes would at least provide access to
~/Downloads and
/tmp when clicking
Computer.
Many thanks to anyone who can provide some insight.