container-structure-test
container-structure-test copied to clipboard
Incorrect permissions inside test container with setuid turned on
I'm not exactly sure if this is a bug but when running a test against an image to check the permissions of a binary executable with the setuid bit turned on, it reports different permissions to what they actually are when manually starting the container.
fileExistenceTests:
- name: 'my-test'
path: '/app/build/usr/local/bin/my-binary'
uid: 998
gid: 998
permissions: '-rwsr-xr-x'
shouldExist: true
Error: /app/build/usr/local/bin/my-binary has incorrect permissions. Expected: -rwsr-xr-x, Actual: urwxr-xr-x
My own container:
user@my-pod-c75584fb7-4p6wh:/usr/local/sbin$ ls -latr /app/build/usr/local/bin/
total 31108
-rwsr-xr-x 1 user user 31837352 Jul 30 10:32 my-binary
drwxr-xr-x 1 user user 4096 Aug 4 14:50 ..