Can't select files to upload in a browsers

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't select files to upload in a browsers

dmitry.sensei
Firefox and Chromium browser, in the file selection window for upload,
does not show the contents of directories other than the Downloads
directory


OpenBSD 6.6-current
OpenBSD 6.6 GENERIC.MP#509 amd64

openbox-3.6.1p7     small, fast & usable window manager
firefox-71.0        Mozilla web browser
chromium-78.0.3904.106 Chromium browser
gtk+2-2.24.32p8     multi-platform graphical toolkit
gtk+3-3.24.13       multi-platform graphical toolkit
gtk+4-3.96.0p6      multi-platform graphical toolkit

--
Dmitry Orlov

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

Paco Esteban
On Fri, 06 Dec 2019, dmitry.sensei wrote:

> Firefox and Chromium browser, in the file selection window for upload,
> does not show the contents of directories other than the Downloads
> directory

That's expected, it's unveil(2) in action.
Take a look at /etc/chromium/unveil* for Chromium.  Can't remember where
Firefox defines it.

Cheers,

--
Paco Esteban.
5818130B8A6DBC03

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

Stuart Henderson
In reply to this post by dmitry.sensei
On 2019-12-06, dmitry.sensei <[hidden email]> wrote:

> Firefox and Chromium browser, in the file selection window for upload,
> does not show the contents of directories other than the Downloads
> directory
>
>
> OpenBSD 6.6-current
> OpenBSD 6.6 GENERIC.MP#509 amd64
>
> openbox-3.6.1p7     small, fast & usable window manager
> firefox-71.0        Mozilla web browser
> chromium-78.0.3904.106 Chromium browser
> gtk+2-2.24.32p8     multi-platform graphical toolkit
> gtk+3-3.24.13       multi-platform graphical toolkit
> gtk+4-3.96.0p6      multi-platform graphical toolkit
>

This is expected.

Chromium has been using unveil(2) to restrict file access for some
time, and this has recently come to Firefox in -current. This prevents
the browser from being able to access sensitive files unless given
access (in a root-controlled file).

See https://marc.info/?l=openbsd-ports-cvs&m=157539245010077&w=2
and /usr/local/share/doc/pkg-readmes/firefox for more information
about how this affects Firefox.


Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

dmitry.sensei
In reply to this post by Paco Esteban
Ok. Thanks.
I done reading https://www.reddit.com/r/openbsd/comments/e65t22/pledge2_and_unveil2_support_in_firefox/

:)

пт, 6 дек. 2019 г. в 16:21, Paco Esteban <[hidden email]>:

>
> On Fri, 06 Dec 2019, dmitry.sensei wrote:
>
> > Firefox and Chromium browser, in the file selection window for upload,
> > does not show the contents of directories other than the Downloads
> > directory
>
> That's expected, it's unveil(2) in action.
> Take a look at /etc/chromium/unveil* for Chromium.  Can't remember where
> Firefox defines it.
>
> Cheers,
>
> --
> Paco Esteban.
> 5818130B8A6DBC03
>


--
Dmitry Orlov

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

Jordan Geoghegan-3
In reply to this post by dmitry.sensei


On 2019-12-06 02:56, dmitry.sensei wrote:

> Firefox and Chromium browser, in the file selection window for upload,
> does not show the contents of directories other than the Downloads
> directory
>
>
> OpenBSD 6.6-current
> OpenBSD 6.6 GENERIC.MP#509 amd64
>
> openbox-3.6.1p7     small, fast & usable window manager
> firefox-71.0        Mozilla web browser
> chromium-78.0.3904.106 Chromium browser
> gtk+2-2.24.32p8     multi-platform graphical toolkit
> gtk+3-3.24.13       multi-platform graphical toolkit
> gtk+4-3.96.0p6      multi-platform graphical toolkit
>

That's because both browsers are using unveil.

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

dmitry.sensei
In reply to this post by Stuart Henderson
Hi!
Can I setup unveil for browsers by usergroups or login classes?

пт, 6 дек. 2019 г. в 16:25, Stuart Henderson <[hidden email]>:

>
> On 2019-12-06, dmitry.sensei <[hidden email]> wrote:
> > Firefox and Chromium browser, in the file selection window for upload,
> > does not show the contents of directories other than the Downloads
> > directory
> >
> >
> > OpenBSD 6.6-current
> > OpenBSD 6.6 GENERIC.MP#509 amd64
> >
> > openbox-3.6.1p7     small, fast & usable window manager
> > firefox-71.0        Mozilla web browser
> > chromium-78.0.3904.106 Chromium browser
> > gtk+2-2.24.32p8     multi-platform graphical toolkit
> > gtk+3-3.24.13       multi-platform graphical toolkit
> > gtk+4-3.96.0p6      multi-platform graphical toolkit
> >
>
> This is expected.
>
> Chromium has been using unveil(2) to restrict file access for some
> time, and this has recently come to Firefox in -current. This prevents
> the browser from being able to access sensitive files unless given
> access (in a root-controlled file).
>
> See https://marc.info/?l=openbsd-ports-cvs&m=157539245010077&w=2
> and /usr/local/share/doc/pkg-readmes/firefox for more information
> about how this affects Firefox.
>
>


--
Dmitry Orlov

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

Stuart Henderson
On 2019-12-10, dmitry.sensei <[hidden email]> wrote:
> Can I setup unveil for browsers by usergroups or login classes?

Due to the slightly unusual way Firefox deals with the config files
(searches in /etc/firefox and then falls back to files in /usr/local/lib)
you might be able to partially do what you want by making /etc/firefox
mode 750 and setting the group ownership. Untested but I suspect it
will work.

Otherwise not without code changes to the unveil implementation in
the browsers.


Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

acampbell
In reply to this post by Stuart Henderson
On 06 Dec 2019, Stuart Henderson wrote:

> On 2019-12-06, dmitry.sensei <[hidden email]> wrote:
> > Firefox and Chromium browser, in the file selection window for upload,
> > does not show the contents of directories other than the Downloads
> > directory
> >
> >
> > OpenBSD 6.6-current
> > OpenBSD 6.6 GENERIC.MP#509 amd64
> >
> > openbox-3.6.1p7     small, fast & usable window manager
> > firefox-71.0        Mozilla web browser
> > chromium-78.0.3904.106 Chromium browser
> > gtk+2-2.24.32p8     multi-platform graphical toolkit
> > gtk+3-3.24.13       multi-platform graphical toolkit
> > gtk+4-3.96.0p6      multi-platform graphical toolkit
> >
>
> This is expected.
>
> Chromium has been using unveil(2) to restrict file access for some
> time, and this has recently come to Firefox in -current. This prevents
> the browser from being able to access sensitive files unless given
> access (in a root-controlled file).
>
> See https://marc.info/?l=openbsd-ports-cvs&m=157539245010077&w=2
> and /usr/local/share/doc/pkg-readmes/firefox for more information
> about how this affects Firefox.
>
>

For me this doesn't work as described for Firefox in -current (no
access to /tmp or ~/Downloads), even with all the config files for
pledge and unveil copied to /etc/firefox. It does work in Chromium.


--
Anthony Campbell http://www.acampbell.uk

Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

jungle Boogie
In reply to this post by dmitry.sensei
On Fri, Dec 6, 2019, 2:58 AM dmitry.sensei <[hidden email]> wrote:

> Firefox and Chromium browser, in the file selection window for upload,
> does not show the contents of directories other than the Downloads
> directory
>

See here

https://www.reddit.com/r/openbsd/comments/eh25ma/firefox_how_to_select_file_to_upload/

>
Reply | Threaded
Open this post in threaded view
|

Re: Can't select files to upload in a browsers

acampbell
On 09 Jan 2020, jungle Boogie wrote:

> On Fri, Dec 6, 2019, 2:58 AM dmitry.sensei <[hidden email]> wrote:
>
> > Firefox and Chromium browser, in the file selection window for upload,
> > does not show the contents of directories other than the Downloads
> > directory
> >
>
> See here
>
> https://www.reddit.com/r/openbsd/comments/eh25ma/firefox_how_to_select_file_to_upload/
>

Thanks very much for this link, which provided the clue needed for
me to get access to ~/Downloads in Firefox. I downloaded a file to
this directory and this apparently caused Firefox to know about its
existence. Ctrl-o now opens ~/Downloads again and allowss me to see
all the files it contains.

--
Anthony Campbell http://www.acampbell.uk