# Anki 26.09.2 installer can make /usr/share/mime unreadable with restrictive umask

**URL:** <https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106>\
**Category:** Help\
**Created:** [September 17, 2026, 2:58am UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106 "2026-09-17T02:58:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrabe](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@hrabe](https://forums.ankiweb.net/u/hrabe)\
**Post date:** [September 17, 2026, 2:58am UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106/1 "2026-09-17T02:58:41Z")

</div>

This appears to be the same underlying problem reported previously but closed without a solution.

I have encountered what appears to be the same problem again with Anki 26.09.2 on Debian.

My shell uses a restrictive umask. After running the supplied Anki install script with sudo, I found two permission problems:

1. Files installed under `/usr/local/share/anki` were readable only by root. I had already worked around this with:

```auto
chmod -R a+rX /usr/local/share/anki

```

1. More seriously, files under the system-wide `/usr/share/mime` hierarchy had also become readable only by root.

The latter caused GTK applications invoked from Anki to fail. In Anki, selecting File → Import caused an immediate abort:

```auto
Gtk-WARNING **: Could not load a pixbuf from icon theme.
This may indicate that pixbuf loaders or the mime database could not be found.

Gtk:ERROR:...: Failed to load
/usr/share/icons/Adwaita/scalable/status/image-missing.svg:
Unrecognized image file format

```

I initially checked and rebuilt the GDK Pixbuf loader cache and reinstalled the relevant Debian packages (`libgdk-pixbuf`, `librsvg`, etc.), with no effect. `LD_DEBUG=libs` showed that Anki was loading the normal Debian GTK/GDK Pixbuf/GLib libraries.

The problem disappeared immediately after restoring normal read/search permissions under `/usr/share/mime`.

So the apparent SVG/GDK Pixbuf error was actually caused by the MIME database being unreadable.

It appears that the installer, or `xdg-mime` / `update-mime-database` invoked by it, is inheriting a restrictive umask from the installation environment. Running the installer with an explicit system-install umask avoids the problem:

```auto
sudo sh -c 'umask 022; exec ./install.sh'

```

Even if the underlying behavior of `update-mime-database` is considered an upstream/distribution issue, I think the Anki installer should protect against it. A system-wide application installer should not be able to make `/usr/share/mime` inaccessible to ordinary users merely because the invoking user has `umask 077`.

Setting `umask 022` near the beginning of the privileged Linux installation script would appear to be a simple defensive fix.

The same issue also explains why files copied into `/usr/local/share/anki` can otherwise end up root-readable only.

---

<div class="post-metadata">

**Author:** ![Danika\_Dakika](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/danika_dakika/32/17815_2.png) [@Danika\_Dakika](https://forums.ankiweb.net/u/Danika_Dakika)\
**Post date:** [September 17, 2026, 3:53am UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106/2 "2026-09-17T03:53:42Z")

</div>

> [@hrabe](#):
>
> the same underlying problem reported previously

Where was it reported?

---

<div class="post-metadata">

**Author:** ![hrabe](https://avatars.discourse-cdn.com/v4/letter/h/bc8723/32.png) [@hrabe](https://forums.ankiweb.net/u/hrabe)\
**Post date:** [September 17, 2026, 2:35pm UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106/3 "2026-09-17T14:35:05Z")

</div>

The links are not possible to enter, so remove the space after https to get there:

> [@Installing Anki on Ubuntu causes: Gtk-WARNING \*\*: Could not load a pixbuf from icon theme](https://forums.ankiweb.net/t/installing-anki-on-ubuntu-causes-gtk-warning-could-not-load-a-pixbuf-from-icon-theme/43532):
>
> Hello, I’ve tried installing Anki (following the installation guide from anki docs) to Ubuntu 22.04 and 20.04 and have had the same issue with the installation messing up the permissions for GTK based apps. (basically most of the icons don’t work, unless apps are started with sudo). I have tried alot of fixes found on the internet from various threads with some success with the most improvement comming by changing the permission in the /usr/share/mime. For example using this command: play_button code Th…

---

<div class="post-metadata">

**Author:** ![abdo](https://sea2.discourse-cdn.com/flex002/user_avatar/forums.ankiweb.net/abdo/32/654_2.png) [@abdo](https://forums.ankiweb.net/u/abdo)\
**Post date:** [September 17, 2026, 3:12pm UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106/4 "2026-09-17T15:12:52Z")

</div>

Logged here: [Linux installer can make /usr/share/mime unreadable with restrictive umask · Issue #5636 · ankitects/anki · GitHub](https://github.com/ankitects/anki/issues/5636)

Contributions are welcome.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/anki2/original/1X/8f1279ababc5879d54e4838989f606cfe55af8c7.jpeg) [@system](https://forums.ankiweb.net/u/system)\
**Post date:** [October 17, 2026, 3:12pm UTC](https://forums.ankiweb.net/t/anki-26-09-2-installer-can-make-usr-share-mime-unreadable-with-restrictive-umask/71106/5 "2026-10-17T15:12:56Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
