apko icon indicating copy to clipboard operation
apko copied to clipboard

Path mutations on symlinks have unexpected effects

Open amouat opened this issue 2 years ago • 1 comments

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.

amouat avatar Apr 04 '23 13:04 amouat

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.

amouat avatar May 04 '23 10:05 amouat