OSRM docker premission denied



  • Trying to start. https://hub.docker.com/r/osrm/osrm-backend/ box

    wget http://download.geofabrik.de/europe/germany/berlin-latest.osm.pbf
    docker run -t -v "${PWD}:/data" osrm/osrm-backend osrm-extract -p /opt/car.lua /data/berlin-latest.osm.pbf
    

    and everything is wrong.

    [root@sql2-dev osrm]# docker run -v "/opt/osrm:/data" osrm/osrm-backend osrm-extract -p "/opt/car.lua" "/data/berlin-latest.osm.pbf"
    Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
    [info] Parsed 0 location-dependent features with 0 GeoJSON polygons
    [info] Using script /opt/car.lua
    [info] Input file: berlin-latest.osm.pbf
    [info] Profile: car.lua
    [info] Threads: 1
    [info] Parsing in progress..
    [info] input file generated by osmium/1.8.0
    [info] RAM: peak bytes used: 18042880
    [error] Problem opening file: /data/berlin-latest.osrm.timestamp :  (possible cause: "Permission denied") (at include/storage/tar.hpp:38)
    [root@sql2-dev osrm]#
    

    Diagnosing rights is fine.

    [root@sql2-dev osrm]# ls -la
    total 135176
    drwxrwxrwx.  2 ashumeyko ashumeyko      120 Nov  5 14:51 .
    drwxrwxrwx. 12 root      root           205 Nov  4 19:05 ..
    -rwxrwxrwx.  1 ashumeyko ashumeyko 67198659 Nov  5 08:39 berlin-latest.osm.pbf
    

    Deep diagnosis and attempted launch

    docker run  -it --cap-add SYS_PTRACE -v "${PWD}:/data" osrm/osrm-backend
    

    root@cc0d1d00b34b:/data# cd /data
    root@cc0d1d00b34b:/data# ls -la
    total 135176
    drwxrwxrwx. 2 1001 1001 120 Nov 5 09:51 .
    dr-xr-xr-x. 1 root root 40 Nov 5 10:48 ..
    -rwxrwxrwx. 1 1001 1001 67198659 Nov 5 03:39 berlin-latest.osm.pbf
    root@cc0d1d00b34b:/data#

    In the docker, it's all crumbling to create whatever it is:

    root@cc0d1d00b34b:/data# touch test
    touch: cannot touch 'test': Permission denied

    Oops doesn't know what that means to fix it?



  • It's not surprising, but the answer is simple. disable selinux

    sudo setenforce 0
    


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2