Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User ’airflow' should be in group 'root' #509

Open
NBardelot opened this issue Mar 3, 2020 · 2 comments
Open

User ’airflow' should be in group 'root' #509

NBardelot opened this issue Mar 3, 2020 · 2 comments

Comments

@NBardelot
Copy link
Contributor

NBardelot commented Mar 3, 2020

It is a common good practice for Docker/Kubernetes to create a user who is not root to run the main process of the container of course, but it is also a good practice to make the user member of the root group (which provides not special rights by itself and is not a security issue).

This is especially true when running containers in OpenShift. Please see the OpenShift official guidelines:

Support Arbitrary User IDs

By default, OpenShift Enterprise runs containers using an arbitrarily assigned user ID. This provides additional security against processes escaping the container due to a container engine vulnerability and thereby achieving escalated permissions on the host node.

For an image to support running as an arbitrary user, directories and files that may be written to by processes in the image should be owned by the root group and be read/writable by that group. Files to be executed should also have group execute permissions.

Adding the following to your Dockerfile sets the directory and file permissions to allow users in the root group to access them in the built image:

RUN chgrp -R 0 /some/directory && chmod -R g+rwX /some/directory
@vpavlin
Copy link

vpavlin commented Mar 16, 2020

@VedantMahabaleshwarkar can you please send a PR for this?

@VedantMahabaleshwarkar
Copy link

@vpavlin done. PR : #519

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants