Skip to content

Instantly share code, notes, and snippets.

@gjasny
Created February 26, 2021 11:18
Show Gist options
  • Save gjasny/b2e5a39520c05a4ddd87f7d556d5e695 to your computer and use it in GitHub Desktop.
Save gjasny/b2e5a39520c05a4ddd87f7d556d5e695 to your computer and use it in GitHub Desktop.
Ubuntu Hirsute bug
$ docker run -ti ubuntu:hirsute bash
root@008ec583a743:/# apt update
root@008ec583a743:/# sh -c 'if [ -x /usr/bin/true ]; then echo yes; else echo no; fi'
yes
root@008ec583a743:/# apt install -y nano # or any other package
root@008ec583a743:/# sh -c 'if [ -x /usr/bin/true ]; then echo yes; else echo no; fi'
no
root@008ec583a743:/# if [ -x /usr/bin/true ]; then echo yes; else echo no; fi
yes
@gjasny
Copy link
Author

gjasny commented Feb 26, 2021

strace -f sh -c 'if [ -x /usr/bin/true ]; then echo yes; else echo no; fi'
...
faccessat2(AT_FDCWD, "/usr/bin/true", X_OK, AT_EACCESS) = -1 EPERM (Operation not permitted)

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