A default install of Barman on CentOS v7 gives config files that are root owned:
/etc/barman.conf
/etc/barman.d (and all files inside)
Shoudl these not be owned by "barman:barman", so that configuration of backups can be done without having to be root?
+1 to making barman non-root-able
this issue might be obsolete: I just learned from this ticket that you can point barman to any config file with a simple -c option like
barman -c /path/to/barman.confLast edit: Gunnar 2021-11-25
@Gunnar , even if you can specify a local config, shouldn't the default configs be owned by
barman:barmaninstead ofroot? As it stands, we need to give root orsudo vi /etc/barman.confpriv to the DBA's, when all they should need issudo su - barmanto do everything they need.Right?
hm, my working hypothesis for now would be that as long the
barmanuser can find and access a validbarman.confshe should be happy with that and operate. The default/etc/barman/barman.confcan be owned by whomever as it never plays any role on such a system I would say.If you are lazy enough you create an alias for the barman user like
alias barman='barman -c /path/to/barman.confnaturallyI am happy to accepts any explanation on what may be wrong with this understanding if it was wrong though.
In an ideal world the installation script
setup.pyrun with the--userflag would set this up by itself (I can't say whether it works that way or not yet)I am happy to explain the reasons why we chose root:root permissions for
the system wide configuration.
There is already a way to easily override that: by default, the file in the
HOME directory of Barman has a higher priority (~barman/.barman.conf).
See:
https://docs.pgbarman.org/release/2.15/barman.5.html#configuration-file-locations
As a result I am not a fan of changing the default permissions of the
system wide configuration - my devops side of the brain tells me that that
folder should be managed by configuration managers with proper change
management policies.
Anyway, my 2 cents.
Ciao,
Gabriele
Il giorno gio 25 nov 2021 alle ore 15:58 Gunnar dulhaver@users.sourceforge.net ha scritto:
Related
Tickets: #94
thx for claryfying. Especially as it also contains confirmation that it is possible (and how) to run barman withouth root priviledges (as per i.e. this thread).
Also, obviousely all the aliassing (as mentioned above) becomes obsolet this way.
Last edit: Gunnar 2021-11-26