Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTlHV-0001VR-Fo for pgsql-docs@arkaria.postgresql.org; Mon, 14 Mar 2022 14:02:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nTlGV-00043E-Bh for pgsql-docs@arkaria.postgresql.org; Mon, 14 Mar 2022 14:01:39 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTlGV-000429-4V for pgsql-docs@lists.postgresql.org; Mon, 14 Mar 2022 14:01:39 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nTlGS-0001XF-PW for pgsql-docs@lists.postgresql.org; Mon, 14 Mar 2022 14:01:38 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 22EE1Wsf172347; Mon, 14 Mar 2022 10:01:32 -0400 From: Tom Lane To: Daniel Gustafsson cc: "Daniel Westermann (DWE)" , "pgsql-docs@lists.postgresql.org" Subject: Re: Fir mkdir command in "Short Version" for installing from source In-reply-to: <9E25E4E0-7E68-4D97-A031-F3099EDCF09D@yesql.se> References: <9E25E4E0-7E68-4D97-A031-F3099EDCF09D@yesql.se> Comments: In-reply-to Daniel Gustafsson message dated "Mon, 14 Mar 2022 10:08:05 +0100" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <172345.1647266492.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 14 Mar 2022 10:01:32 -0400 Message-ID: <172346.1647266492@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 13 Mar 2022, at 17:05, Daniel Westermann (DWE) wrote: >> Is it worth fixing that with "mkdir -p ..."? = > Well, it will fail unless the user already had /usr/local/pgsql/, but I = hear > what you're saying. Though I bet almost anyone following this will be a= ble to > figure it out but there is little to no value in not being correct. I think that at the time that was written, mkdir didn't universally have a "-p" option. But POSIX has required that for a very long time, so it's probably safe to assume it now. A larger issue is that blind "mkdir -p" may not produce the ownerships and permissions you want for the parent directories. That's not a topic to get into in a one-line summary, though. regards, tom lane