protonscr

"bad interpreter: Permission denied"

steamclosed Distro Family: ArchDistro-provided steam package
ValveSoftware/steam-for-linux#7201 · opened 2020-06-16 by xuanruiqi · updated 2024-03-10 · 7 comments · github
Xxuanruiqi 2020-06-16 github

Your system information

  • Steam client version (build number or date): June 4, 2020
  • Distribution (e.g. Ubuntu): Arch Linux
  • Opted into Steam client beta?: No
  • Have you checked for system updates?: Yes

Please describe your issue in as much detail as possible:

I get this error when I try to run /usr/bin/steam:

/usr/bin/steam: /usr/lib/steam/steam: /usr/bin/env: bad interpreter: Permission denied
/usr/bin/steam: line 2: /usr/lib/steam/steam: Success

Running sh /usr/bin/steam is fine.
I have checked that sh and bash are symlinked and discovered by env correctly:

$ type -a sh
sh is /usr/bin/sh
$ type -a bash
bash is /usr/bin/bash
$ getfacl /usr/bin/env
getfacl: Removing leading '/' from absolute path names
# file: usr/bin/env
# owner: root
# group: root
user::rwx
group::r-x
other::r-x

Also, I am sure that noexec is not set on my file system. Other shebang scripts run without problem. In addition, other of my machines run the /usr/bin/steam script without issue. I'm out of ideas now, so I wonder what could be wrong here.

I use ZFS for my device; / and /home are datasets/subvolumes in my ZFS pool. I have no idea if this could be the culprit and it seems unlikely, but this might be it.

Steps for reproducing this issue:

  1. Run /usr/bin/steam
TTTimo 2020-06-22 github

Arch maintains the steam installer for their distribution, this should probably be reported through their channels.

TTTimo 2020-06-22 github

CNR in any case (on Manjaro). The symlinks and trampoline scripts end up at /usr/lib/steam/bin_steam.sh - that's the script with the /usr/bin/env failing for you.

Xxuanruiqi 2020-06-22 github

@TTimo : Hello, I did file a bug report on Arch Linux bug tracker, and the Arch maintainers were unable to replicate or track down the bug. As a recourse they recommended that I open a bug here.

Nnexpspace 2022-02-08 github

I think I found it. I had exactly the same error under following conditions:

  • Arch Linux
  • FireJail 0.9.68
  • Apparmor installed, loaded and firejail-default enforced
  • I had apparmor set in ~/.config/firejail/globals.local (or /etc/config/firejail/globals.local)

This resulted in exactly the same error. I "fixed" it by disabling firejail-apparmor for steam by creating following file:

~/.config/firejail/steam.local:

ignore apparmor

Now steam-runtime as well as steam-native works.

Kkisak-valve maintainer 2023-01-20 github

Hello @xuanruiqi, are you still experiencing this issue on an up to date system? Were you also trying to run Steam with firejail?

Kkisak-valve maintainer 2023-03-03 github

Closing pending feedback.

Aandrewfader 2024-03-10 github

On Arch Linux, using apparmor, and firejail, the default steam profile tries to execute this script and it cannot.

/usr/lib/steam/steam: /home/andrew/.local/share/Steam/steam.sh: /usr/bin/env: bad interpreter: Permission denied
/usr/lib/steam/steam: line 216: /home/andrew/.local/share/Steam/steam.sh: Success
[ 2274.886072] audit: type=1400 audit(1710056212.443:249): apparmor="DENIED" operation="exec" class="file" profile="firejail-default" name="/home/andrew/.local/share/Steam/steam.sh" pid=176569 comm="bash" requested_mask="x" denied_mask="x" fsuid=1000 ouid=1000

As noted, adding 'ignore apparmor' to the steam.local "solves" the problem by disabling apparmor, but a better way would be to whitelist or allow exec that shell script, but I don't really know how. It involves a firejail configuration directive I think.

Nothing extracted yet.