Advice on setting up Nominatim with other, non-admin user -- www-data keeps coming up #3905
Replies: 4 comments
-
|
For the The |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for sharing this, I thought it was for the webserver only. Secondly, I have now got it working. The documentation is correct but I have misread the first command's db user. So now I use: |
Beta Was this translation helpful? Give feedback.
-
|
Great that you got it working. Just wanted to add: as Nominatim is based on libpq, it will also respect any |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to setup Nominatim locally (and thank you very much for this free and open source software) but with a (reasonable) twist: I would like to have a new Pg user which is not admin to own this DB.
Following the guide here for the common Pg admin
postgres, as a start, has failed: https://nominatim.org/release-docs/latest/admin/Advanced-Installations/So it still uses the dreaded
www-datauser and that user is a Pg-related one, becausecreateuseris a Pg command.I have also tried it with my own simple Pg user (e.g.
osm) with the same results(osmbecause ideally I would like one user (osm) to own all OSM dbs, tiles etc.)Additionally, it would be very convenient for me to use ENV variables PGSERVICE and PGSERVICEFILE so as not to pass the DSN with a password (eventually because of my automated script, it should contain the password) around.
Is there such support already? I have not found it, but that's not important.
The good news is that if I create a Pg user
www-data, then the commandnominatim import --prepare-databasesucceeds. In the worst case perhaps I can start with this user and when all is setup I can transfer ownership to my own user?10min Edit: well the command which works is actually:
sudo -u postgres nominatim import --prepare-database(so as to run it as Pg admin). However, as I said asking forpostgrespassword will break my automated pipeline. In this case forpsqlcommands I usually I doPGSERVICEFILE="credentialsfile" PGSERVICE='postgres' psql. OK but the commandPGSERVICEFILE="credentialsfile" PGSERVICE='postgres' NOMINATIM_DATABASE_DSN="pgsql:dbname=nominatim;user=www-data" nominatim import ...fails, most likely confused.Anyway, creating Nominatim db with other users I think is important but since I can setup the server even without this feature, it is ok for me, so don't waste much time on it.
Beta Was this translation helpful? Give feedback.
All reactions