Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove assumptions about temp file locations
Many configuration files live in a parent directory that is only writeable by root or another user. Despite this, current code assumes the parent directory is writable by the consul-template process. In addition, the assumption is made that the temporary file is created on the same filesystem. We can still retain an atomic copy+delete using the existing `copyFile(...)` and deferred `os.Remove(...)`. This patch allows for more granular security and more variation in the host filesystem. In my case, I run consul-template as a dedicated user, so that I can explicitly give it permission to writeable locations.
- Loading branch information