Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wqA5n-0023tg-22 for pgsql-pkg-debian@arkaria.postgresql.org; Sat, 01 Aug 2026 13:49:36 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wqA5l-001BRa-1a for pgsql-pkg-debian@arkaria.postgresql.org; Sat, 01 Aug 2026 13:49:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wq60n-000vEE-1r for pgsql-pkg-debian@lists.postgresql.org; Sat, 01 Aug 2026 09:28:09 +0000 Received: from back2.interfax.ru ([46.28.21.171]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wq60k-00000001QWr-2pNr for pgsql-pkg-debian@postgresql.org; Sat, 01 Aug 2026 09:28:08 +0000 Received: from back2.interfax.ru (localhost [127.0.0.1]) by back2.interfax.ru (Postfix) with ESMTP id 5BE6EC0015 for ; Sat, 1 Aug 2026 12:28:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 back2.interfax.ru 5BE6EC0015 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=interfax.ru; s=back; t=1785576485; bh=8ucFnX4BvHNkBHXrXmg29Tk8/4J3a5KdmI2W+vkKTJI=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version:From; b=lTMLmfi5+7EsyYcvFy+hWRF9KK91N9aQ1Ix13nWE48gGxF0nSGQ6iWuTUfLpvYCTZ W8YUGfWyOUemGkBMPJfdeHP/JdBTwBQZi88WJCH915MwtMMYSqvxJpNrggr390uROU mOff/wleI4KjhS5NOA10mn1fb5IhaBs6/Kk+q+PJTL53AC2Jm/Ahgs4a3p2DzF99Gf omZpaYgBQ0h0JsLF4EwymLnNq7a73yxnOjt0lKes31NuKoX/GsksdMvfTqRNkK74Qp xOWCJoVj5I6/t7g7jdtUK3PRNnjyf5NjzRVOVWYmf7EUGIFqHqmu80Wa0cM+I2jweh Uf2L8IkozGcuQ== Received: from URANUS26.devel.ifx (URANUS26.devel.ifx [10.4.15.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by back2.interfax.ru (Postfix) with ESMTPS for ; Sat, 1 Aug 2026 12:28:04 +0300 (MSK) Received: from Uranus28.devel.ifx (10.8.9.21) by URANUS26.devel.ifx (10.4.15.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.39; Sat, 1 Aug 2026 12:28:04 +0300 Received: from Uranus28.devel.ifx ([169.254.80.18]) by Uranus28.devel.ifx ([169.254.80.18]) with mapi id 15.02.1748.039; Sat, 1 Aug 2026 12:28:04 +0300 From: =?koi8-r?B?78zFxyDzwc3PyszP1w==?= To: "pgsql-pkg-debian@postgresql.org" CC: =?koi8-r?B?8s/Nwc4g89XUxc3Yxdc=?= Subject: Debian package installation script overwrite debian dpkg statoverride. Thread-Topic: Debian package installation script overwrite debian dpkg statoverride. Thread-Index: Ad0hl9YvMCG18TZhRYu9SZSzQhRX/g== Date: Sat, 1 Aug 2026 09:28:04 +0000 Message-ID: Accept-Language: ru-RU, en-US Content-Language: ru-RU X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.6.48.24] Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi all. Original ticket: https://github.com/EnterpriseDB/barman/issues/1211 I tried to use barman to backup on mounted NFS in "local" way. Here is some= conflict with ownership, because barman by default work under user barman,= but backup files must have owner postgres. So I changed user for barman to= postgres and so do for barman directories. There is mechanics in Debian ho= w to do this permanently. Need to use dpkg-statoverride: dpkg-statoverride --add postgres postgres 750 /var/lib/barman dpkg-statoverride --add postgres postgres 750 /var/log/barman But this is dont work, the directory still change ower to user barman after= package upgrading, because in the installation script there is the code th= at overwrite dpkg-statoverride, in "postinst" script is: # Make sure the home and log directories exist for dir in /var/lib/barman /var/log/barman do mkdir -p $dir chown barman:barman $dir chmod 750 $dir done Instead of this "make sure" code the directory must be correctly created in= the debian package. In the file barman.dirs exists only: /var/lib/barman But /var/log/barman must be here too. As for permissions and ownership, the debian policy said https://www.debian.org/doc/debian-policy/policy.txt 10.10.1. The use of "dpkg-statoverride" If a system administrator wishes to have a file (or directory or other such thing) installed with owner and permissions different from those in the distributed Debian package, they can use the "dpkg- statoverride" program to instruct "dpkg" to use the different settings every time the file is installed. But you use debhelper and I don't see easy method to change ownership of th= e directory created by dh_installdirs. But some solutions can be googled.