Skip to content

secretFiles are not chowned correctly in services using DynamicUser #56

Open
@Mic92

Description

When User/Group on a systemd service using DynamicUser are set it will break:

serviceConfig = {             
  Restart = "always";         
  DynamicUser = true;         
  User = "grafana-agent";     
  Group = "grafana-agent"; 
...
}
Jun 01 16:26:51 vault-00 5vhm1wk4czcva1xj4v79rszsaparjy37-precreate-dirs-for-grafana-agent[341435]: + chown grafana-agent:grafana-agent /tmp/detsys-vault/
Jun 01 16:26:51 vault-00 5vhm1wk4czcva1xj4v79rszsaparjy37-precreate-dirs-for-grafana-agent[341438]: chown: invalid user: ‘grafana-agent:grafana-agent’

But also if the User/Group field is not set it will not chown the secret at all.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions