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

Permissions of DockerEnvironment.SharedDir() #25

Open
esnible opened this issue Mar 15, 2022 · 2 comments
Open

Permissions of DockerEnvironment.SharedDir() #25

esnible opened this issue Mar 15, 2022 · 2 comments

Comments

@esnible
Copy link

esnible commented Mar 15, 2022

I had several hours of confusion and difficulty because on my test machine the Docker instances received a /shared directory (holding /shared/config etc) with permissions rwxr-xr-x but on a CircleCI machine running a PR the Docker instances saw permissions rwx------ for /shared.

(This affects test containers that don't run as root.)

It is unclear to me if the problem is that only I am using Docker on a Mac, I am using Go 1.17, or I have a different umask than the CircleCI machine. I tried setting my umask to 000 but was unable to get my builds to fail the same way as the CircleCI builds.

@bwplotka
Copy link
Contributor

bwplotka commented Apr 28, 2022

I think I experienced this in the past too. This is a common problem if someone puts NOBODY in the container. Somehow setting UserID in your container when scheduling it via e2e to 1000 works 🙈

But your case might be different indeed, just a mismatch of perms/users on Linux vs Mac?

Anyway, worth def to investigate - we need to find better way I guess or document this (:

@bwplotka
Copy link
Contributor

Common pattern is to use User: strconv.Itoa(os.Getuid()), but again, it might be different for Mac setups.

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

2 participants