Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: set $HOME when stepping down from root
Ticket: #236 Why: In #234 we moved from using `gosu` to `setpriv` to step down from the root user to the couchdb user. There is a behavioural difference between and `gosu` and `setpriv` in that `gosu` will [set the $HOME environment variable](https://github.com/tianon/gosu/blob/master/setup-user.go#L45) to that of the target user. Without this behaviour, `couchdb` includes the root user home directory (`/root`) in various search paths and crashes because it doesn't have read permissions. How: Explicitly set `$HOME` to the `couchdb` user home directory before we execute as the `couchdb` user, replicating the `gosu` behaviour.
- Loading branch information