I encounter this error when running bitbake on a CI slave :
Exception: PermissionError: [Errno 1] Operation not permitted: '/home/jenkins/workspace/jobDev/YoctoBuild/Yocto-Linux-v3/build-rzn1d/tmp/work/rzn1_snarc-dip-linux-gnueabi/base-files/3.0.14-r89/package/etc'
The invoked function is os.lchown(path, uid, gid) within fixup_perms
The context is : A jenkins master and a jenkins slave each on a separate Docker container. The slave container is based on a debian stretch base image. The jenkins slave is running as jenkins user which can sudo without password. I have check this in the container. It has a volume mounted on the host. The jenkins user in the container has uid:gid == 1001:1001, just as on the host. The yocto recipes exists since a while, and runs with success outside the CI context.
[Edit] Jenkins is not the problem. Running another Yocto based buid within a docker image, but outside jenkins, ends with the same problem. So, I suspect a problem tied with the volume on the centOS host... but what ... SELinux ?
The container is configured with the prerequisites found on the yocto project pages, and after having fixed LANG or proxy problems, bitbake runs correctly, until this error occurs after around 45mn.
I am not at all the author of the Yocto recipes, but the "author" has no idea about the problem. It really looks like it is something related to the CI / Docker environment.
I would be glad to have some hints, and can add here the slave container dockerfile if required.
Best regards, and thanks in advance for your help or ideas. J-L