Code Monkey home page Code Monkey logo

Comments (9)

evrastil avatar evrastil commented on August 24, 2024 1

@smecsia yes I did and I can confirm it works. BUT it is still not usable for me in corporate environment where I must use win7 and other people must use it. I have only one win user which I can not change or add another which would not have admin role :(.

initdb runs fine there is no issues with that under win and if there would be a way and Im sure there is to pg_ctl start postgres it would solve the problem for all win users. I think actualy most of win users are in admin group for convinience. Could you try to modify your code so it would be able to start the postgres using the pg_ctl wrapper. It would be nice if ru.yandex.qatools.embed.postgresql.PostgresStarter#getDefaultInstance could take IRuntimeConfig param which would modify it to start the postgres with ru.yandex.qatools.embed.postgresql.Command#PgCtl command?

from postgresql-embedded.

smecsia avatar smecsia commented on August 24, 2024

@evrastil Are you trying to launch postgres as a user with admin privileges in your system? If so, this is a duplication of #5
Please try to launch postgres binaries manually http://www.postgresql.org/docs/9.1/static/server-start.html and share your experience.

from postgresql-embedded.

evrastil avatar evrastil commented on August 24, 2024

You are right Im running as system user

C:\Users\asdf\AppData\Local\Temp\postgresql-embed-f4002ef1-55cd-48a7-9b81-91255b03b95a\pgsql\bin>postgres -D C:\Users\asdf\AppData\Loc
al\Temp\postgresql-embed-f4002ef1-55cd-48a7-9b81-91255b03b95a\db-content-e73e4c89-687a-4dfc-8316-5a5c04895e61
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.

This is big issue for me because I cant change my environment, did you find a workaround for this?

from postgresql-embedded.

smecsia avatar smecsia commented on August 24, 2024

@evrastil Unfortunately no. There is a PR #22 which probably would allow to achieve something like running postgres commands as runas /user:postgres .... This might solve your issue.
It would be great if you could test postgresql-embedded with that patch. If it works, I'll merge it and release the new version.

from postgresql-embedded.

evrastil avatar evrastil commented on August 24, 2024

To add runas will not solve my problem only user I have has admin privilages and i cant add any new.

Did you consider using just pg_ctl start/stop -U user -P pwd -D datadir
because it seems to avoid the security pg check and it would work for me, IMHO no need to use psotgres you could just user the pg_ctl wrapper.

btw I will check if the PR #22 works but Ill geve to ge a hold of another computer where I can change things.

from postgresql-embedded.

smecsia avatar smecsia commented on August 24, 2024

@evrastil This won't work. We have to use initdb anyway, because we need to initialize new database first. Have you tried launching it under your user?

from postgresql-embedded.

smecsia avatar smecsia commented on August 24, 2024

@evrastil Ok. I'll take a look what can be done a bit later.

from postgresql-embedded.

smecsia avatar smecsia commented on August 24, 2024

@evrastil I guess we can close the ticket, since your PR is already in the released version.

from postgresql-embedded.

evrastil avatar evrastil commented on August 24, 2024

@smecsia yes, thank you

from postgresql-embedded.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.