Additional "Creating a Cluster" Guidance for Windows Users
"Jonathan S. Katz" <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.devel.documentation |
|---|---|
| Message-ID | <[email protected]> |
Hi, Per the last update release[1] I was going through some of our documentation around creating clusters and noticed that we may want to provide a bit more guidance around creating clusters on Windows: https://www.postgresql.org/docs/current/creating-cluster.html i.e.: "Because the data directory contains all the data stored in the database, it is essential that it be secured from unauthorized access. initdb therefore revokes access permissions from everyone but the PostgreSQL user, and optionally, group." However, this does not explicitly state that initdb performs this revocation only for *non-Windows systems* -- to lock down the data directory after an initdb run on a Windows system, it requires manual intervention. I've attached a patch that explicitly states the above. I wrapped the guidance in a "Warning" box given the data directory is exposed if not locked down properly. I would also recommend this is backpatched to 9.4. If in agreement on the above methodology + wording, I can generate the backpatches. Thanks, Jonathan [1] https://www.postgresql.org/about/news/1939/
initdb-win-v1.patch
(text/plain, 1.4 KB)
diff --git a/doc/src/sgml/runtime.sgml b/doc/src/sgml/runtime.sgml
index e784268512..2ca49d2482 100644
--- a/doc/src/sgml/runtime.sgml
+++ b/doc/src/sgml/runtime.sgml
@@ -135,14 +135,23 @@ postgres$ <userinput>initdb -D /usr/local/pgsql/data</userinput>
<para>
Because the data directory contains all the data stored in the
database, it is essential that it be secured from unauthorized
- access. <command>initdb</command> therefore revokes access
- permissions from everyone but the
+ access. On all operating systems other than Windows,
+ <command>initdb</command> revokes access permissions from everyone but the
<productname>PostgreSQL</productname> user, and optionally, group.
Group access, when enabled, is read-only. This allows an unprivileged
user in the same group as the cluster owner to take a backup of the
cluster data or perform other operations that only require read access.
</para>
+ <warning>
+ <para>
+ If you are running PostgreSQL on Windows and create your cluster using
+ <command>initdb</command>, you will need to set the permissions on the data
+ directory manually. You should revoke all user access to the data directory
+ except for the <productname>PostgreSQL</productname> user.
+ </para>
+ </warning>
+
<para>
Note that enabling or disabling group access on an existing cluster requires
the cluster to be shut down and the appropriate mode to be set on all
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE+oS2la8r95ogZD/x8QSccp8cZScFAlzYSb8ACgkQ8QSccp8c ZSdNzQ/8CD04goilB06PACXQlWs4LjDRbg6Bwa7rKgZ18bA7q7PhwCQymwccV4fR 2tFpM/bQZOtecUOFW8AAW3XJAIfVpG+32mwEoroKeRNVUU525j3uBNeBBV3iDKb4 iGx8cPN3jFwRPPDKB1nmTmFDoG8SccV42FXUuZt5GQcmBuNNgJ/sKw2lkq0uTGWy Md3l+pOeTfTE0doewWlHIJFlnbjrOmDzs1DpPtTS+YvPp1Tr7BWWRbgczjlcz4tf bszJ0t01xmQE1N1dbUvvdATUGLRFx54NCvcT2sd/AqJHRW6EWwcH12hwvtZMY3tE 8Whz4/m69IJfPfiA37JxxT1tI+cQetRNluKtcZJlKjCBGGqWVnFd+sOHnEI5vURY uFDtQBKnLD7Heks4mZ4BWIYMAhfV/K7L4Pqx4LhoUQYRPQToWCvFswkAKAVyW6+l EGmu3Tn2N90zg+I6a54YzOvVH09ZUUEYCZB27bO6Mhhoy30F47EYipXgx/9ZLifv lhykeF/GdOp7/nvFKuXHhsqnjyo5NovstI26gH//GwbhfNoZ+pY05XZkaNLgI2Il 3kg6/RX0InDIi/NrG3SB28Q6XjTKC6Z/OmFBsbPBn8k+tgg5gHG6KncgTWVqmSAd yD6Oku66sT+835EaXGF4PxyXMbYf0ctcXflWTinsMgwzQ/b0fYU= =lqY1 -----END PGP SIGNATURE-----