Page MenuHomeDevCentral

/usr/local/etc/envvars: Permission denied in runit initialization script
Open, LowPublic

Description

Building an image on the top of nasqueron/nginx-php-fpm Docker image, I see:

$ docker run --name tmp 585a158865e9
/usr/local/sbin/runsvdir-init: line 2: /usr/local/etc/envvars: Permission denied

At this stage, this image ran as app, not as root, and /usr/local/etc/envvars didn't exist.

Event Timeline

dereckson raised the priority of this task from to Normal.
dereckson updated the task description. (Show Details)
dereckson added a project: Docker images.
dereckson added subscribers: dereckson, Sandlayth.
dereckson renamed this task from Check chmod for /usr/local/etc/envvars to /usr/local/etc/envvars: Permission denied in runit initialization script.Nov 26 2015, 17:44
dereckson updated the task description. (Show Details)

What's going on is the export > /usr/local/etc/envvars fails, at the user app doesn't have write access to /usr/local/etc.

This part of the image should be run as root, so we could detect the id and offer:

  • an explicit failure
  • a chown of /etc/service, /usr/local/etc/, etc. to app

The first seems preferable, as nginx needs to listen port 80.

dereckson lowered the priority of this task from Normal to Low.Nov 26 2015, 17:51

This only occur when a USER app ; <commands ; USER root sequence is interrupted when we inspect the container at this step.