Thread: Help with starting portable version of postgresql
Hi,
I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable
It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to understand how to load it manually. I tried starting postgres.exe but it's saying:
Execution of PostgreSQL by a user with administrative permissions is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises. See the documentation for
more information on how to properly start the server.
That0s strange, because the gui instead is able to load it so I'de like to know how can I do the same thing (and I can't find the source code of the ui).
Thanks a lot in advance,
--
Marco Di Antonio
I downloaded the portable version of Postegresql from http://greg.webhop.net/postgresql_portable
It works but the problem is that to start the server you must load it from the gui. Instead since I want to start the server from my app, I need to understand how to load it manually. I tried starting postgres.exe but it's saying:
Execution of PostgreSQL by a user with administrative permissions is not
permitted.
The server must be started under an unprivileged user ID to prevent
possible system security compromises. See the documentation for
more information on how to properly start the server.
That0s strange, because the gui instead is able to load it so I'de like to know how can I do the same thing (and I can't find the source code of the ui).
Thanks a lot in advance,
--
Marco Di Antonio
marco di antonio wrote: > Hi, > > I downloaded the portable version of Postegresql from > http://greg.webhop.net/postgresql_portable > > It works but the problem is that to start the server you must load it > from the gui. Instead since I want to start the server from my app, I > need to understand how to load it manually. I tried starting > postgres.exe but it's saying: > Execution of PostgreSQL by a user with administrative permissions is not > permitted. > The server must be started under an unprivileged user ID to prevent > possible system security compromises. See the documentation for > more information on how to properly start the server. > > That0s strange, because the gui instead is able to load it so I'de > like to know how can I do the same thing (and I can't find the source > code of the ui). I'd look in Local Users and Groups to see if this utility has created a special user account to run the postmaster under. Also, after the GUI has startted it, use something like Process Explorer (from Microsoft, formerly SysInternals) to see what user the postgres process is running as. my guess is you need to invoke postgres.exe with the appropriate arguments, such that it runs as that non-privileged user, see http://msdn.microsoft.com/en-us/library/ms682431(VS.85).aspx for one way to do this...
John R Pierce wrote on 06.12.2009 00:01: >> I downloaded the portable version of Postegresql from >> http://greg.webhop.net/postgresql_portable >> >> It works but the problem is that to start the server you must load it >> from the gui. Instead since I want to start the server from my app, I >> need to understand how to load it manually. I tried starting >> postgres.exe but it's saying: >> Execution of PostgreSQL by a user with administrative permissions is not >> permitted. You should use pg_ctl instead. That will take care of dropping any administrative rights the current user might have. I'musing a set of batch files to create a "portable" postgres, and I use pg_ctl for that purpose even with administratoraccount.