[GH-ISSUE #3198] nano [ magic_load() failed: No such file or directory ] #2001

Closed
opened 2026-05-05 08:40:17 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @ghost on GitHub (Jan 30, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3198

When using the nano profile I noticed that the application shows the below error message on each start:

[ magic_load() failed: No such file or directory ]

Not sure if this negatively affects usage, but it can be confusing. Looks like this is caused by wusc, more specifically by not whitelisting /usr/share/file. That directory - on Arch at least - has /usr/share/file/misc/magic.mgc, which nano tries to get at.

Originally created by @ghost on GitHub (Jan 30, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3198 When using the nano profile I noticed that the application shows the below error message on each start: `[ magic_load() failed: No such file or directory ]` Not sure if this negatively affects usage, but it can be confusing. Looks like this is caused by wusc, more specifically by not whitelisting /usr/share/file. That directory - on Arch at least - has /usr/share/file/misc/magic.mgc, which nano tries to get at.
Author
Owner

@rusty-snake commented on GitHub (Jan 30, 2020):

We have /usr/share/misc (Fedora has /usr/share/misc/magic.mgc and /usr/share/misc/magic there. If /usr/share/file is just the Arch path for this, we should consider to add it into wusc.

<!-- gh-comment-id:580394457 --> @rusty-snake commented on GitHub (Jan 30, 2020): We have `/usr/share/misc` (Fedora has `/usr/share/misc/magic.mgc` and `/usr/share/misc/magic` there. If `/usr/share/file` is just the Arch path for this, we should consider to add it into wusc.
Author
Owner

@ghost commented on GitHub (Jan 30, 2020):

@rusty-snake Just checked 2 Arch machines. On both /usr/share/misc is an empty dir and stat shows birth dating back to 2015 and 2017. To me that looks like somewhere along the way packages used to put files there, stopped doing so and maintainers forgot to use !emptydirs (which is a makepkg configuration option to remove empty directories from a package). I agree we better add /usr/share/file to wusc as you suggest. Will take care of it shortly.

<!-- gh-comment-id:580495628 --> @ghost commented on GitHub (Jan 30, 2020): @rusty-snake Just checked 2 Arch machines. On both /usr/share/misc is an empty dir and stat shows birth dating back to 2015 and 2017. To me that looks like somewhere along the way packages used to put files there, stopped doing so and maintainers forgot to use !emptydirs (which is a makepkg configuration option to remove empty directories from a package). I agree we better add /usr/share/file to wusc as you suggest. Will take care of it shortly.
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: github-starred/firejail#2001
No description provided.