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 1ewmlg-0005OK-QB for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Mar 2018 10:39:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ewmlf-00035P-EC for pgsql-bugs@arkaria.postgresql.org; Fri, 16 Mar 2018 10:39:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewmlf-00035G-7q for pgsql-bugs@lists.postgresql.org; Fri, 16 Mar 2018 10:39:23 +0000 Received: from ns5.gunduz.org ([107.170.136.15] helo=ns1.gunduz.org) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ewmlZ-0006Co-W9 for pgsql-bugs@lists.postgresql.org; Fri, 16 Mar 2018 10:39:22 +0000 Received: from asus-laptop04.gunduz.org (unknown [88.98.205.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ns1.gunduz.org (Postfix) with ESMTPSA id 373313FCE7; Fri, 16 Mar 2018 10:39:15 +0000 (UTC) Message-ID: <1521196753.21279.23.camel@gunduz.org> Subject: Re: BUG #15108: Initialization problem postgresql-10-setup initdb From: Devrim =?ISO-8859-1?Q?G=FCnd=FCz?= To: alertas , pgsql-bugs@lists.postgresql.org Date: Fri, 16 Mar 2018 10:39:13 +0000 In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-JyNAEl2IyQuh4GCjHyV1" X-Mailer: Evolution 3.26.6 (3.26.6-1.fc27) Mime-Version: 1.0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-JyNAEl2IyQuh4GCjHyV1 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, 2018-03-16 at 08:29 +0100, alertas wrote: > I don't understand, in the official documentation appear "initdb must be= =20 > run as the user that will own the server process, because the server=20 > needs to have access to the files and directories that initdb creates.= =20 > *Since the server cannot be run as root, you must not run initdb as root= =20 > either*. (It will in fact refuse to do so.)" As I wrote in my previous post: The "initdb" that the documentation mentions is: /usr/pgsql-10/bin/initdb which must be run by non-root user. Then, there is a setup script: /usr/pgsql-10/bin/postgresql-10-setup which is a wrapper around initdb (and some other things), and the related l= ines are: # Initialize the database initdbcmd=3D"$PGENGINE/initdb --pgdata=3D'$PGDATA' --auth=3D'ident'" initdbcmd+=3D" $PGSETUP_INITDB_OPTIONS" $SU -l postgres -c "$initdbcmd" >> "$PGLOG" 2>&1 < /dev/null So, when user runs /usr/pgsql-10/bin/postgresql-10-setup initdb the word "initdb" is a *parameter* to the script, and as written in the documentation, we run initdb as the postgres user. -HTH Regards, --=20 Devrim G=C3=BCnd=C3=BCz EnterpriseDB: https://www.enterprisedb.com PostgreSQL Consultant, Red Hat Certified Engineer Twitter: @DevrimGunduz , @DevrimGunduzTR --=-JyNAEl2IyQuh4GCjHyV1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEH8GKHNUOKtDEiyD22MM9/pLPbrUFAlqrntEACgkQ2MM9/pLP brU/Kw/+L7lWS1VVxG0ZbAXfghM6IYmdife5va5Ii7zWTTOeCdGcFWoU4YJj04we MKqsKp/wVnR3p3Imgvp2erXaDdaJzFIurZFOyXpsPBhp0o2Dz2k3rUxzXxTI3JGA VfhW9pUOQbJlAylLPeOqLBLd035Hj3SAOFJIEn/bPCgOB6C15SESsxeV6DnqUHJ1 qsNlukMnGgVlVfjHF1KRblan+8awuNn6VVSSJ2u6d2zSrVqQBBMGCAyFALEF+yjf AjtmGcr5qbAVlu52O1xX922wkzkkribl6wyaRU/pZbhFbjH8qr9UccsW95cgnCr4 +qRCioPJNegN66Nak/CC2kYiprsnI93jCGK6rXEB6qQ7W7V0VS4wFn8QvzXcRVx3 spryxK56o+E/gV2/t3SDqbuY9bwxfjUvUmzdRffDlKQhCTrYIfw+5pR4MA2WwQ0J 7TLyci/3xmUvxusy5wc7Z5vAUlJL7O6rOsudX0Bz0FCsOEZsmd4AMrYTOIcVu62r upc7MoKcFoeiaeGtBDY8DoFmx5zY2DdrE6salZnqcKl1V/b+MYoIgD2lO3nwGOh7 ZI/2xDwSiGQ7Nc7G0dtguW9yfFO2H77X/5eY3O44Blsqu2gD1JDowc8Er7XWhxwt c2spJoWhJHvBiYCpp/Ll+EQnPLSpOVUknuCnSLOEvvtAg6XQB8Q= =kXFc -----END PGP SIGNATURE----- --=-JyNAEl2IyQuh4GCjHyV1--