I am following the steps as described in http://wiki.openstreetmap.org/wiki/Nominatim/Installation to install the nominatim osm db on my own server. I need to create some functions before doing
So to create those functions I am running this command:
But, it gives me following error:
As I can see error occurs while running the following query:
I am running the commands with root user and nominatim.so file owner is also root. I already changed the file owner to postgres and tried but the same error is there. Please guide what to do? asked 27 Jun '12, 07:24 Ravi Kotwani |
Found on postgreSQL doc: "The user ID the PostgreSQL server runs as must be able to traverse the path to the file you intend to load. Making the file or a higher-level directory not readable and/or not executable by the postgres user is a common mistake." If the full path is reachable, perhaps you need the 'executable' flag on the .so file as well (chmod +x)... answered 27 Jun '12, 10:09 Pieren I have already applied the 777 permission to module folder (Directory of .so file). And owner of nominatim.so file is root, I have also already tried it by changing the owner (chown) as postgres, nominatim and etc. But still facing the same problem? Is it a way I can delete this nominatim.so file and get new one with some easy steps?
(27 Jun '12, 10:49)
Ravi Kotwani
2
You need to check the permissions not just of the directory, but of the directory's parent, and that directories parent, and... etc. They all need to be accessible by which ever user you are running postgresql as. To confirm if this is the case it maybe be helpful to switch to the postgres user and attempt to access the nominatim.so file using the full path. i.e. su -l postgres ls -alh /home/user/path/path/nominatim.so
(27 Jun '12, 10:51)
twain
2
Yeah, and don't forget the execution permission flag on the .so file itself. Rebuilding the .so file is not your current problem since postgreSQL is even not able to access the file.
(27 Jun '12, 10:59)
Pieren
@Twain: Thanks for guiding, I just checked the owner of parent -> parent -> parent etc. and set the parent directory permission same as you told and its working fine now. Thanks.
(27 Jun '12, 12:05)
Ravi Kotwani
I had the same problem. I checked all privileges and they were ok. I restarted postgres (/usr/bin/pg_ctl stop|start) and then it worked.
(06 Jan '16, 12:06)
dusiema
|