Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6QJG-0004uh-Ru for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 00:41:54 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f6QJF-0003eF-U4 for pgsql-general@arkaria.postgresql.org; Thu, 12 Apr 2018 00:41:53 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6QJE-0003dD-On for pgsql-general@lists.postgresql.org; Thu, 12 Apr 2018 00:41:53 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f6QJ9-0007t9-Mo for pgsql-general@lists.postgresql.org; Thu, 12 Apr 2018 00:41:51 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BDC6120BB5; Wed, 11 Apr 2018 20:41:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 11 Apr 2018 20:41:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=RLNPgZXbfbGabtqfeuSbJWuE0kjQf sq862GOvlzehMg=; b=Xxjp50UZ2iw9U4t9vqTZ5ZksUU8cxQLym3JByNCY+XXqS sxvuAtN4/CZmT7c2+R7Nw24bxkMa2ZkwlfVI8NVaV2OjNIk9uvBBGeA7y3tWTJCb qMuxIFRBrqALRBkvjjwbY90+ejRXwJagTFzDwCeuuQa5UbRhuji8osxJ6f/4RAgD 2mj8xGkH16XvZYEjkr5YexpGtwiIXOvEtZ0hWgkPSe8X2lXddxLT0oWJyBZdeSe1 eKr4rBLusNyuCUBFQD8NVyTNyQD8YCVGaz90F4L+SxAIbKxh2GJJAuOKpz2m7/SQ unZfBmZ4hVifhYHRQgAiMe38XJhVsAJNsBSbE9e2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=RLNPgZ XbfbGabtqfeuSbJWuE0kjQfsq862GOvlzehMg=; b=i8DmgwzWr/Y9hCyb5RfZJ8 /EcPdTMRbTXC8NC5qBrWGKGF6+nn+5yWbKOzIAvVsgRDyDTggo+VUIKdfzy3AgkD 27yE5LWshXgJ3j0yJaEedVvixdtccjJTTgEZwJHqUD1qe65qC8oyxztDtG/+hmD8 P9OIoNkXkrJME4rcSCdZZZtPiO1tY+L5xI3T2H4XI/PJJ2sfQcNJW+V4WpIQvszk xBu22ZVivYiFq6ChvxeIiyFB1iHNzyPgUKZ1xErdHYMx4ygquu87ATyRxJalsKUS nYkJm49PL7ZKxfbxWwD9s5aQHAYeyPNyAC3kn79couv7PG7buAwGE9P33Iq1wphg == X-ME-Sender: Received: from [192.168.1.2] (71-35-123-124.tukw.qwest.net [71.35.123.124]) by mail.messagingengine.com (Postfix) with ESMTPA id 198AAE4483; Wed, 11 Apr 2018 20:41:45 -0400 (EDT) Subject: Re: Commands linked to pg_wrapper not working with non-root users To: Jonathan Leroy - Inikup Cc: Tim Cross , pgsql-general@lists.postgresql.org References: <878t9t753a.fsf@gmail.com> <6968c432-c9c7-6241-55da-8b078e6e56ed@aklaver.com> From: Adrian Klaver Message-ID: <54116237-20a6-d7ad-1d54-5076f38c593e@aklaver.com> Date: Wed, 11 Apr 2018 17:41:45 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 04/11/2018 05:36 PM, Jonathan Leroy - Inikup wrote: > 2018-04-12 1:49 GMT+02:00 Jonathan Leroy - Inikup : >> Maybe I will try to "dissect" pg_wrapper to find where the error >> occurs, but the script is quite complex... > > OK, I've found the issue : pg_wrapper is trying to get the value of > the "data_directory" setting by reading the postgresql.conf file. > However, my user can't access the postgresql.conf file. > > So I've bootstrapped a fresh Debian 8 VM with just postgresql-9.6, and > compared files permissions between that VM and my production servers. > All my production postgresql.conf files have a chmod 640 vs 644 on my new VM. > > After digging, I've found that the SaltStack recipe who configure all > my servers force the file chmod to 640... > I've fixed it: everything works now. :) Great. Thanks for the follow up. > > Thank you all for your help! > -- Adrian Klaver adrian.klaver@aklaver.com