GoogleContainerTools / GoogleContainerTools/container-structure-test

Incorrect permissions inside test container with setuid turned on

Open
#263 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.5k
Forks
212
PR merge metrics
No merged PRs in 30d

Description

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 ..
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.