This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

ERROR: permission denied for relation placex

1

I imported planet data onto my CentOS machine, and when trying to use the Nominatim installation using curl:

curl 'http://localhost/nominatim/reverse?format=xml&lat=-33.859728&lon=151.227569&zoom=18&addressdetails=1&debug=1'

I get a long debug message with the reoccuring:

ERROR:  permission denied for relation placex

During the installation process, I tried to alter role, and got a message saying that role "www-data_ does not exist:

bash-4.1$ psql -d nominatim -c 'ALTER USER "www-data" RENAME TO "apache"'
ERROR:  role "www-data" does not exist

Could they be related? How do I solve the issue of permission for placex relation?

asked 24 Mar '15, 18:53

baekacaek's gravatar image

baekacaek
176121317
accept rate: 0%


One Answer:

1

Did you follow the instructions on https://wiki.openstreetmap.org/wiki/Nominatim/Installation, namely where it says:

createuser -SDR www-data

?

answered 24 Mar '15, 23:46

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Yes I made sure to run that command (because I forgot to at first).

(24 Mar '15, 23:59) baekacaek

Because the user didn't exist when the database was created all the grant commands will have failed. You will need to go through and run them manually. You can find them in tables.sql, an example would be:

GRANT SELECT ON import_status TO "www-data" ;

(25 Mar '15, 13:37) twain

That could be the reason why. Could you guide me on how I could run it manually? I found the tables.sql file, but I'm not quite sure what I am supposed to do with it. Thanks

(06 Apr '15, 20:32) baekacaek

Source code available on GitHub .