Score:0

pg_ctl start on Windows gives error: could not open file "global/pg_control": Permission denied

sb flag

On Windows Server 2022, I am logged in as Administrator and trying to do a pg_ctl start on a Postgresql database that was initially created by user SYSTEM, but get the following error in the cmd console (I tried both with and without "Run as administrator"):

>pg_ctl.exe start -o "-p 5432" -U user -P password -D C:\aiw\aiw1\data -l C:\aiw\aiw1\trace\postgres.trace
waiting for server to start.... stopped waiting
pg_ctl: could not start server
Examine the log output.

The specified log file contains this error:

2023-08-28 04:01:07.898 PDT [2088] PANIC:  could not open file "global/pg_control": Permission denied

I checked the permissions for the data directory and they seem ok, both user SYSTEM and group Administrators have access to it: SYSTEM perms and Administrators perms. I also checked that the user Administrator really is part of the group Administrators: admins properties.

Why does this happen? Am I missing some permissions?

OS is running in a VM, full version info is:

Edition: Windows Server 2022 Standard
Version: 21H2
OS build: 20348.350

Weirdly enough, if I add full control permissions to the user Administrator or to the group Users, then the pg_ctl start command runs successfully.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.