apko
apko copied to clipboard
Path mutations on symlinks have unexpected effects
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.
The nginx image doesn't suffer from this any more for some reason. Will leave open as it's probably still a problem in general.