Skip to content

xbps-query fails #709

Open
Open

Description

@notramo

This below is from a root shell:

$ ls -ld /etc/xbps.d/
drwxr-xr-x 2 root root 3 Nov 15 13:19 /etc/xbps.d/

$ ls -alh /etc/xbps.d/
total 22K
drwxr-xr-x  2 root root   3 Nov 15 13:19 .
drwxr-xr-x 70 root root 158 Nov 10 21:03 ..
-rw-r--r--  1 root root  16 Nov 15 13:19 linux.conf

$ cat /etc/xbps.d/linux.conf
ignorepkg=linux

$ xbps-query firefox # or any random pkg
ERROR: cannot read configuration file /etc/xbps.d/linux.conf: Permission denied
ERROR: Failed to initialize libxbps: Permission denied

Activity

  1. Duncaen commented on Nov 16, 2026

    @Duncaen
    Member

    No idea that EPERM comes directly from fopen(path, "r"), probably from the underlying syscall, I don't think there is anything in xbps that would cause this.

    Are you using something weird like proot?

  2. notramo commented on Nov 16, 2026

    @notramo
    Author

    No, I ran it in an actual root shell started with sudo. No LSM active.

    Interestingly, other xbps-* commands succeed, including xbps-install and xbps-remove.

  3. Duncaen commented on Nov 16, 2026

    @Duncaen
    Member

    Maybe strace it, the open should defentively not return EPERM.

  4. notramo commented on Nov 16, 2026

    @notramo
    Author
    open("/etc/xbps.d/linux.conf", O_RDONLY) = -1 EACCES (Permission denied)
    
  5. Duncaen commented on Nov 16, 2026

    @Duncaen
    Member

    No idea that if that fails its probably not xbps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions