Skip to content

fcgiwrap can't list /db, leading to runtime error: open64: 13 Permission denied /db/db//osm3s_osm_base Unix_Socket::7Β #129

@LogicalOverflow

Description

@LogicalOverflow

When running the docker container, any request to overpass just returns the following:

<?xml version="1.0" encoding="UTF-8"?>                                                                                                                                                                               <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" lang="en"/>
  <title>OSM3S Response</title>
</head>
<body>

<p>The data included in this document is from www.openstreetmap.org. The data is made available under ODbL.</p>
<p><strong style="color:#FF0000">Error</strong>: runtime error: open64: 13 Permission denied /db/db//osm3s_osm_base Unix_Socket::7 </p>

</body>
</html>

The issue seems to be caused by the /db directory being owned by the overpass user with drwx------ permission while fcgiwrap runs as the nginx user, meaning it does not have permission to list the files in /db. Either running chown nginx or chmod og+rx /db inside the container resolve the issue.

This occurs both with and without mounting /db as a volume.

As a workaround, I added OVERPASS_PLANET_PREPROCESS=chmod og+rx /db to the container environment variables, which resolves the issue.

For reference, I was using the following environment variables, though I have tried a variety of combinations and they all produced this error:

- OVERPASS_META=yes
- OVERPASS_MODE=init
- OVERPASS_PLANET_URL=file:///germany-latest.osm.bz2
- OVERPASS_USE_AREAS=false
- OVERPASS_STOP_AFTER_INIT=false
- OVERPASS_ALLOW_DUPLICATE_QUERIES=yes
- OVERPASS_RULES_LOAD=10

(The germany-latest.osm.bz2 file is pre-downloaded and mounted via a volume)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions