[pkg-go] Bug#891202: Bug#891202: prometheus-alertmanager: False owner/group for /var/lib/prometheus
Martín Ferrari
tincho at tincho.org
Fri Feb 23 13:48:32 UTC 2018
Hi,
On 23/02/18 12:17, tuxcoder wrote:
> The service trys to `mkdir /var/lib/prometheus/alertmanager` on startup,
> but the dir `/var/lib/prometheus` is owned by root.
>
> If the package `prometheus` is installed first this is not the case.
Uhm, I think you are mistaken, or I missed something.
The directory is created when unpacking the deb file:
$ dpkg -L prometheus-alertmanager | grep /var/lib/
/var/lib/prometheus
/var/lib/prometheus/alertmanager
Then the post-installation script does this:
chown -R prometheus:prometheus /var/lib/prometheus/alertmanager || true
chown -R prometheus:prometheus /var/log/prometheus || true
And the initsciprt does this (as root):
mkdir -p `dirname $PIDFILE` || true
chown -R $USER: `dirname $LOGFILE`
chown -R $USER: `dirname $PIDFILE`
So, I don't know where you saw that mkdir, nor where it could be a problem.
--
Martín Ferrari (Tincho)
More information about the Pkg-go-maintainers
mailing list