Re: /var/lib/pgsql 0755 - Mailing list pgsql-pkg-yum

From Markus Bräunig
Subject Re: /var/lib/pgsql 0755
Date
Msg-id 463F7267-4169-40AD-9AF9-855EDB696895@braeunig.biz
Whole thread Raw
In response to /var/lib/pgsql 0755  (Justin Pryzby <pryzby@telsasoft.com>)
List pgsql-pkg-yum
Not at all,

we normally just have about 3 users (used) on the servers:
root, postgres and a monitoring user. 

We directly login into the postgres user (ssh key | auditing through bastion host if necessary | no password set). 

In the past most suid bit binaries were forbidden by policy and on most System this still is the way to go. 

Markus

> Am 27.05.2021 um 20:50 schrieb Justin Pryzby <pryzby@telsasoft.com>:
> 
> 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
combinedwith a sgid bit 
 
> 
> -- 
> Justin

pgsql-pkg-yum by date:

Previous
From: Justin Pryzby
Date:
Subject: /var/lib/pgsql 0755
Next
From: Christoph Berg
Date:
Subject: Re: /var/lib/pgsql 0755