mirror of https://github.com/minio/minio.git
Allow su-exec to fail when users explicity use --user (#7776)
This allows MinIO containers to run properly without expecting higher privileges in situations where following restrictions on containers are used - docker run --user uid:gid - docker-compose up (with docker-compose.yml with user) ```yml ... user: "1001:1001" command: minio server /data ... ``` - All openshift containers Fixes #7773
This commit is contained in:
parent
0394a8f013
commit
22f6756ce6
|
@ -60,7 +60,12 @@ docker_switch_user() {
|
|||
return
|
||||
fi
|
||||
fi
|
||||
# check if su-exec is allowed, if yes proceed proceed.
|
||||
if su-exec "${owner}" "/bin/ls" >/dev/null 2>&1; then
|
||||
exec su-exec "${owner}" "$@"
|
||||
fi
|
||||
# fallback
|
||||
exec "$@"
|
||||
}
|
||||
|
||||
## Set access env from secrets if necessary.
|
||||
|
|
Loading…
Reference in New Issue