Ky sajt do të funksionojë me kufizime, teksa bëjmë mirëmbajtjen e tij për të përmirësuar punën tuaj. Nëse një artikull nuk e zgjidh problemin tuaj dhe dëshironi të bëni një pyetje, kemi bashkësinë tonë të asistencës, e gatshme për t’ju ndihmuar, te @FirefoxSupport në Twitter dhe/r/firefox në Reddit.

Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Mësoni Më Tepër

When trying to access local files, sometimes get 'Access to the file was denied'

  • 6 përgjigje
  • 2 e kanë hasur këtë problem
  • 1 parje
  • Përgjigjja më e re nga henry41

more options

Hi,

I'm trying to access locally-installed help files that are in /usr/share. When I try accessing anything starting with "file:///usr" in Firefox, I get "Access to the file was denied".

I've already set "security.fileuri.strict_origin_policy = false", which now let me access "file:///tmp", "file:///media" and "file:///home", but anything under "file:///usr" (and serveral other top-level directories) still returns the access denied error.

I'm running Firefox 102.0.1 (64-bit) on Ubuntu 22.04.1 LTS.

Hi, I'm trying to access locally-installed help files that are in /usr/share. When I try accessing anything starting with "file:///usr" in Firefox, I get "Access to the file was denied". I've already set "security.fileuri.strict_origin_policy = false", which now let me access "file:///tmp", "file:///media" and "file:///home", but anything under "file:///usr" (and serveral other top-level directories) still returns the access denied error. I'm running Firefox 102.0.1 (64-bit) on Ubuntu 22.04.1 LTS.

Krejt Përgjigjet (6)

more options

Examples please... Post a screenshot of the error and show the path and permissions of the file you're trying to access.

more options

Permissions:

> $ ls -l /usr/share/libreoffice/help/index.html > -rw-r--r-- 1 root root 4013 Jun 1 14:06 /usr/share/libreoffice/help/index.html

Screenshot of error attached.

If I copy index.html to /tmp, with the same permissions, I get the same error. Changing the owner of the file to myself also doesn't help. However, if I copy the file to my home directory, then firefox can access it.

more options

And for completeness:

> $ ls -ld /usr/share/libreoffice/help/ > drwxr-xr-x 4 root root 4096 Jul 6 09:35 /usr/share/libreoffice/help/ > $ ls -ld /usr/share/libreoffice/ > drwxr-xr-x 6 root root 4096 Jul 6 09:35 /usr/share/libreoffice/ > $ ls -ld /usr/share/ > drwxr-xr-x 398 root root 12288 Jul 30 21:58 /usr/share/ > $ ls -ld /usr/ > drwxr-xr-x 14 root root 4096 Nov 22 2021 /usr/

more options

Files under /usr/share/doc seem to be mostly accessible (with the same permission settings - 755 for directories, 644 for files, owner root, group root).

Is there some whitelist/blacklist controlling local file access?

more options

How far do you get when you browse this file path starting with file:///usr/ or does file:///usr/ already fails?

  • file:///usr/share/libreoffice/help/

Note that file access can also be blocked due to sandbox restraints.

Anything in the Browser Console ?

more options

file:///usr returns 'Access Denied' file:///usr/share returns 'Access Denied' file:///usr/share/libreoffice returns 'Access Denied' file:///usr/share/libreoffice/help returns 'File not found'

file:///usr/share/doc show a listing of that directory

Nothing is showing up in the Web Console.

I tried setting "security.sandbox.content.read_path_whitelist" to "/usr/share/libreoffice/help/", but that doesn't help. Also tried running with MOZ_DISABLE_CONTENT_SANDBOX=1, also no improvement.