Re: /var/lib/pgsql 0755

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Markus Bräunig <markus(at)braeunig(dot)biz>
Cc: Devrim Gündüz <devrim(at)gunduz(dot)org>, pgsql-pkg-yum(at)postgresql(dot)org
Subject: Re: /var/lib/pgsql 0755
Date: 2021-05-27 18:50:25
Message-ID: 20210527185025.GD2082@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

On Thu, May 27, 2021 at 06:40:40PM +0000, Markus Bräunig wrote:
> I thought as long as /v/l/p is the homedir of postgres user we should be carefully with changes like this.

I think you mean that you do things like "sudo -iu postgres" to open an
interactive shell. Probably because you want to "cd" into the dir and "ls".

I imagine that's common, but is itself strange to me. You can just "ls" the
dir without sudo without opening an interactive shell, and do anything else,
too. Which is safer (avoids the risk of then leaving the shell opened or
running as the wrong user in the wrong window) and avoids starting down the
path of running around the system putting on different users' "hats".

System users like this are for running their specific daemon, for isolation
purposes and not for running interactive shells. It shouldn't have a password
set, either.

> We normally shift the data dir to other places and the log files as well. For the logfiles we use a separate group combined with a sgid bit

--
Justin

In response to

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Markus Bräunig 2021-05-27 19:17:21 Re: /var/lib/pgsql 0755
Previous Message Justin Pryzby 2021-05-27 18:03:53 /var/lib/pgsql 0755