I have done the following
Steps to reproduce
Basically reopening apple/containerization#509
Using this script
#!/usr/bin/env bash
for i in {1..100}
do
rm -rf source_dir
rm -rf dest_dir
mkdir source_dir
mkdir dest_dir
for j in {1..100}
do
head -c 1000000 < /dev/urandom > source_dir/test${j}.txt
chmod 555 source_dir/test${j}.txt
link source_dir/test${j}.txt dest_dir/test_link${j}.txt
chmod 555 dest_dir/test_link${j}.txt
done
abs_path="$(pwd)/dest_dir"
# tar is arbitary. we just need a command that going to open and read every file in the directory
container run -it --remove --uid=1024 --mount=type=bind,source=${abs_path},target=/dest_dir debian:bookworm-slim tar -cf /tmp/test.tar /dest_dir
done
You will eventually see
tar: /dest_dir/test_link1.txt: Cannot open: Permission denied
tar: /dest_dir/test_link4.txt: Cannot open: Permission denied
tar: /dest_dir/test_link5.txt: Cannot open: Permission denied
Problem description
Intermittent EACCES errors when using hard links in mounts i.e a build system trying to share inputs across multiple actions and using containers as a sandbox.
Environment
- OS: macOs 26.4.1 (25E253)
- Xcode: N/A
- Container: container CLI version 1.0.0 (build: release, commit: ee848e3)
Code of Conduct
I have done the following
Steps to reproduce
Basically reopening apple/containerization#509
Using this script
You will eventually see
Problem description
Intermittent EACCES errors when using hard links in mounts i.e a build system trying to share inputs across multiple actions and using containers as a sandbox.
Environment
Code of Conduct