Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aqud0-0005LD-4n for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Apr 2016 03:41:07 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aqucz-0007lA-Nb for pgsql-bugs@arkaria.postgresql.org; Fri, 15 Apr 2016 03:41:05 +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.84_2) (envelope-from ) id 1aqq7G-0002b6-Pu for pgsql-bugs@postgresql.org; Thu, 14 Apr 2016 22:52:03 +0000 Received: from nm9-vm0.bullet.mail.bf1.yahoo.com ([98.139.213.154]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aqq7D-0007uA-Id for pgsql-bugs@postgresql.org; Thu, 14 Apr 2016 22:52:00 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com.au; s=s2048; t=1460674317; bh=GI9dIErstq2z4sqciOcNMxQb6v1YPysk5/w7m4emxt0=; h=Subject:To:References:From:Date:In-Reply-To:From:Subject; b=CfZUJnTV5nmoyBuoXPYqry6tAUzIL31om8NMCKF15LiKSiKb97cwq5YZt1QLXWw2BvZLuQJ0/5urxng8N6Wg0eXBggS3dfa9jeGEuLI7IKs5nB02GcWMvhQ7xw07c0LBpfBey2nbLge93R/eiy1Sd2ov5OhS7j7YhRnA/B2UJp0QkRQMLcJauQWAUvCloQ4PbJbm4DJZVQMXTrKk07YWcdXeSMc9HS4jPzhpu1kUF9DgTlg2HdrCpRmveu8CRRFjDc0vE/ugx4SJ5URczsZRBJjfuhiXpEcp/yBjEw7op4aPE4HK5Y1fiM/0JjdVe2aghe/wLAGfu1FUp4p1WUCKUQ== Received: from [98.139.170.179] by nm9.bullet.mail.bf1.yahoo.com with NNFMP; 14 Apr 2016 22:51:57 -0000 Received: from [68.142.230.71] by tm22.bullet.mail.bf1.yahoo.com with NNFMP; 14 Apr 2016 22:49:57 -0000 Received: from [127.0.0.1] by smtp228.mail.bf1.yahoo.com with NNFMP; 14 Apr 2016 22:49:57 -0000 X-Yahoo-Newman-Id: 110065.54778.bm@smtp228.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: mCOvO2cVM1lhE2o3i2pmlR3QNBjeM9DFqs5Tc38dr_w9OOv n6PhyGONWeq4gocvIr5kZiW5lbirg.LDxdGVAGsthy2fw_otHcpLovgFlxKy ESI8ChoxBGHTcswTXpQ4Ai7y6bcvxBcWliMXczm6KWC1RNdQ_MzgNScbDS.U HKxFT8amxCZSPf34HYMmnHqK8ghlUA2YkY4drpS_FsFWiCdwLHrmWgjVItX. teZcXAkABZrEHtFRmkH8euPPT6Wls0nLJP7XsVm4XUEv3q6LjMlBb6nRhJXP udG9YJrp67.lnWaA7EOFt22M1otPnoHP1kw5Ebw0oYZraN1fsW8uy16Hr_SS auLdU5Aj0s5ej5lo22Hv3UDXi2Y85FbF1rpbPH.KI4Y4EmPeLDTp.Bo4Bf7i fa4Q2qajohI6TxmUV4AGQWpzFABeLN2L_RXBkAO.OS_uWySy5ncTG0q2MCZS FLJr80m5BzflkzhyfzwJau1c_Let9_nQB6A5stqmfuYazFQeqPpRcUDz0akm 2aCJ0tfCWY9Y81yN7QKhYO4UP65o_3V8- X-Yahoo-SMTP: usKFWTaswBBcTy8Y21tDwLphyiI- Subject: Re: BUG #14083: 'postgresql95-setup initdb' breaks inside docker container To: pgsql-bugs@postgresql.org References: <20160414035835.22934.58240@wrigleys.postgresql.org> <1460632399.897.7.camel@gunduz.org> From: IanB Message-ID: <57101E91.50706@yahoo.com.au> Date: Fri, 15 Apr 2016 08:49:53 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.1 MIME-Version: 1.0 In-Reply-To: <1460632399.897.7.camel@gunduz.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.5 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org On 14/04/16 21:13, Devrim Gündüz wrote: >> >> # /usr/pgsql-9.5/bin/postgresql95-setup initdb >> Failed to get D-Bus connection: Operation not permitted >> failed to find PGDATA setting in postgresql-9.5.service > > Are you running these as root or postgres user? > > I think they need to be run with root. Yes, it is running as postgres user. Looking at postgresql95-setup I can see that the only reason it is running 'systemctl' is to determine the PGDATA path, as follows: PGDATA=`systemctl show -p Environment "${SERVICE_NAME}.service" | sed 's/^Environment=//' | tr ' ' '\n' | sed -n 's/^PGDATA=//p' | tail -n 1` if [ x"$PGDATA" = x ]; then echo "failed to find PGDATA setting in ${SERVICE_NAME}.service" exit 1 fi Further down it gets PGDATA again as follows: # Get data directory from the service file PGDATA=`sed -n 's/Environment=PGDATA=//p' "${SERVICE_FILE}"` When I comment out the first method, PGDATA is set from second method and the script runs successfully *without* needing root privileges. Is the first method even necessary!? -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs