[bug] unreadable emoji directory crashes akkoma #488

Open
opened 2023-02-27 18:59:49 +00:00 by flisk · 0 comments
Contributor

Your setup

OTP

Extra details

No response

Version

3.6.0-0-g36cb19d

PostgreSQL version

15

What were you trying to do?

i was trying to import an emoji pack by placing a directory in static/emojis and forgot to make the directory readable for the user akkoma runs under

What did you expect to happen?

a sensible error message in the admin interface

What actually happened?

akkoma crashed

Logs

Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji
Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating
Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/file.ex:1637: File.ls!/1
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2
Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload}
Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Found emoji packs: 8bfont, blobcat, blobfox, blobfox_flip, meow, nko, blobhaj
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/8bfont/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobcat/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox_flip/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/meow/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/nko/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji
Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating
Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/file.ex:1637: File.ls!/1
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2
Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload}
Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Found emoji packs: 8bfont, blobcat, blobfox, blobfox_flip, meow, nko, blobhaj
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/8bfont/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobcat/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox_flip/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/meow/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/nko/pack.json
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji
Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating
Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/file.ex:1637: File.ls!/1
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0
Feb 27 18:56:06 lain.gay pleroma[1401192]:     (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2
Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload}
Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil
Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Postgrex.Protocol (#PID<0.4368.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.4522.0> exited
Feb 27 18:56:06 lain.gay pleroma[1401192]: [notice] Application pleroma exited: shutdown

Severity

I can manage

Have you searched for this issue?

  • I have double-checked and have not found this issue mentioned anywhere.
### Your setup OTP ### Extra details _No response_ ### Version 3.6.0-0-g36cb19d ### PostgreSQL version 15 ### What were you trying to do? i was trying to import an emoji pack by placing a directory in `static/emojis` and forgot to make the directory readable for the user akkoma runs under ### What did you expect to happen? a sensible error message in the admin interface ### What actually happened? akkoma crashed ### Logs ```shell Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/file.ex:1637: File.ls!/1 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload} Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Found emoji packs: 8bfont, blobcat, blobfox, blobfox_flip, meow, nko, blobhaj Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/8bfont/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobcat/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox_flip/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/meow/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/nko/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/file.ex:1637: File.ls!/1 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload} Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Found emoji packs: 8bfont, blobcat, blobfox, blobfox_flip, meow, nko, blobhaj Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/8bfont/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobcat/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/blobfox_flip/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/meow/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Loading emoji pack from JSON: /srv/akko/static/emoji/nko/pack.json Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] No emoji.txt found for pack "blobhaj", assuming all .png, .gif files are emoji Feb 27 18:56:06 lain.gay pleroma[1401192]: [error] GenServer Pleroma.Emoji terminating Feb 27 18:56:06 lain.gay pleroma[1401192]: ** (File.Error) could not list directory "/srv/akko/static/emoji/blobhaj": permission denied Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/file.ex:1637: File.ls!/1 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:147: Pleroma.Emoji.Loader.find_all_emoji/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:139: Pleroma.Emoji.Loader.make_shortcode_to_file_map/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:128: Pleroma.Emoji.Loader.load_pack/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4249: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (elixir 1.14.3) lib/enum.ex:4250: Enum.flat_map_list/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji/loader.ex:68: Pleroma.Emoji.Loader.load/0 Feb 27 18:56:06 lain.gay pleroma[1401192]: (pleroma 3.6.0-0-g36cb19d) lib/pleroma/emoji.ex:90: Pleroma.Emoji.handle_cast/2 Feb 27 18:56:06 lain.gay pleroma[1401192]: Last message: {:"$gen_cast", :reload} Feb 27 18:56:06 lain.gay pleroma[1401192]: State: nil Feb 27 18:56:06 lain.gay pleroma[1401192]: [info] Postgrex.Protocol (#PID<0.4368.0>) disconnected: ** (DBConnection.ConnectionError) client #PID<0.4522.0> exited Feb 27 18:56:06 lain.gay pleroma[1401192]: [notice] Application pleroma exited: shutdown ``` ### Severity I can manage ### Have you searched for this issue? - [x] I have double-checked and have not found this issue mentioned anywhere.
flisk added the
bug
label 2023-02-27 18:59:49 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: AkkomaGang/akkoma#488
No description provided.