#1104199 kmod: incorrect and confusing error message on EACCES

Package:
kmod
Source:
kmod
Description:
tools for managing Linux kernel modules
Submitter:
Russell Coker
Date:
2025-04-27 07:51:02 UTC
Severity:
normal
#1104199#5
Date:
2025-04-27 07:48:03 UTC
From:
To:
When modinfo is unable to access a module due to path permissions it gets
EACCES and that should be reported to the user as "permission denied" (or
similar).  It currently says "not found" which leads the user to believe that
it was not there which is not the situation.

# modinfo /var/lib/dkms/nvidia-current/535.216.03/6.12.22-amd64/x86_64/module/nvidia-current-peermem.ko.xz
modinfo: ERROR: Module /var/lib/dkms/nvidia-current/535.216.03/6.12.22-amd64/x86_64/module/nvidia-current-peermem.ko.xz not found.

newfstatat(AT_FDCWD, "/var/lib/dkms/nvidia-current/535.216.03/6.12.22-amd64/x86_64/module/nvidia-current-peermem.ko.xz", 0x7ffc581232c0, 0) = -1 EACCES (Permission denied)

This happens under SE Linux if the file has the wrong label.