e2e
e2e copied to clipboard
Permissions of DockerEnvironment.SharedDir()
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.
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 (:
Common pattern is to use User: strconv.Itoa(os.Getuid())
, but again, it might be different for Mac setups.