chainguard-dev / chainguard-dev/apko
Path mutations on symlinks have unexpected effects
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 1.7k
- Forks
- 228
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 62
Description
I was trying to set permissions on a directory, and found the following had no effect:
- path: /var/run/
uid: 65532
gid: 65532
type: directory
permissions: 0o755
recursive: true
But this did work:
- path: /var/run
uid: 65532
gid: 65532
type: directory
permissions: 0o755
recursive: true
The reason turned out to be that /var/run is a symlink to /run, so the correct thing to do is to apply the mutation to /run. This isn't clear to the user however, so either an error/warning should be given, or the mutation applied to the source of the symlink.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the configuration with /var/run as a symlink to /run, then trace the path-mutation handling that processes recursive directory changes. The issue does not name files or tests, and completion requires deciding whether symlinks should produce a warning/error or apply the mutation to their targets, followed by coverage for the chosen behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100