"osinfo-detect -t tree" doesn't work under with sudo/su
When I call osinfo-detect -t tree
under an unprivileged user, I get an expected reply:
$ osinfo-detect -t tree http://mirrors.nic.cz/opensuse/opensuse/distribution/openSUSE-stable/repo/oss/
Tree is an installer for OS 'openSUSE Leap 15.0'
Under root (sudo
, sudo -i
or su -
):
$ sudo osinfo-detect -t tree http://mirrors.nic.cz/opensuse/opensuse/distribution/openSUSE-stable/repo/oss/
Error parsing installer tree: Failed to load .treeinfo|treeinfo file: Operation not supported
I tried stracing the executable, but AFAICT this error comes from a deeper logic inside the code, not a failed syscall.
What's interesting is that this works when I ssh root@localhost
just fine, so the problem is somewhere in the environment. I tried transplanting all env variables from the ssh
session to a su -
one, but the problem remained. Any ideas, please?
The above is using Fedora 30 (libosinfo-1.2.0-7
, osinfo-db-20190319-1
).
I also tried building the latest version from source, bd88a6cb (post-1.5.0), and while I can't get osinfo-detect
to output anything (probably because of database incompatibility?), the error still remains:
$ ./osinfo-detect -t tree http://mirrors.nic.cz/opensuse/opensuse/distribution/openSUSE-stable/repo/oss/
$ sudo ./osinfo-detect -t tree http://mirrors.nic.cz/opensuse/opensuse/distribution/openSUSE-stable/repo/oss/
Error parsing installer tree: Failed to load .treeinfo|treeinfo file: Operation not supported
Thanks!