e2e icon indicating copy to clipboard operation
e2e copied to clipboard

Permissions of DockerEnvironment.SharedDir()

Open esnible opened this issue 2 years ago • 2 comments

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.

esnible avatar Mar 15 '22 01:03 esnible

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 avatar Apr 28 '22 19:04 bwplotka

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

bwplotka avatar May 10 '22 08:05 bwplotka