Skip to content

Help: permission denied while starting process up #144

Description

@AndreFavotto

Hello fellow Brazilians!

I am trying to use epics-in-docker to run a simple IOC with motorSim. If I understand correctly, I should be able to do it with the following compose file:

services:
  motorSim:
    image: motorsim
    build:
      context: ./
      dockerfile: ./epics-in-docker/Dockerfile
      target: no-build
      labels:
        org.opencontainers.image.source: https://github.com/cnpem/epics-in-docker
      args:
        APP_DIRS: /opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC
        RUNDIR: /opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC/iocBoot/iocMotorSim

However, after running it, I get the classic permission denied error:

$ docker compose up
[+] Running 1/1
 ✔ Container examples-motorSim-1  Created                                                                                                                                                         0.0s 
Attaching to motorSim-1
motorSim-1  | procServ: Error - Please change permissions on ./st.cmd to at least ---x--x--x
motorSim-1  | procServ is not able to continue without execute permission
motorSim-1 exited with code 0

This made me think a chmod +x st.cmd was missing. Inspecting the container (overriding the entrypoint with tail -f /dev/null), I see the following:

root@4d980efc35cd:/opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC/iocBoot/iocMotorSim# ls -la
total 44
drwxr-xr-x 1 root root 4096 Jul 18  2025 .
drwxr-xr-x 1 root root 4096 Jul 18  2025 ..
-rwxr-xr-x 1 root root  190 Jul 18  2025 Makefile
-rw-r--r-- 1 root root  776 Jul 18  2025 README
lrwxrwxrwx 1 root root   23 Mar 19 23:12 entrypoint -> /usr/local/bin/lnls-run
-rw-r--r-- 1 root root  717 Jul 18  2025 motorSim.cmd
-rw-r--r-- 1 root root  196 Jul 18  2025 motorSim.iocsh
-rw-r--r-- 1 root root 1493 Jul 18  2025 motorSim.substitutions
-rw-r--r-- 1 root root  478 Jul 18  2025 st.cmd
-rw-r--r-- 1 root root  821 Jul 18  2025 st.cmd.Vx
-rwxr-xr-x 1 root root   94 Jul 18  2025 start_medm
root@4d980efc35cd:/opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC/iocBoot/iocMotorSim# lnls-run ./st.cmd
procServ: Error - Please change permissions on ./st.cmd to at least ---x--x--x
procServ is not able to continue without execute permission
root@4d980efc35cd:/opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC/iocBoot/iocMotorSim# chmod +x *.cmd
root@4d980efc35cd:/opt/epics/modules/motor/modules/motorMotorSim/iocs/motorSimIOC/iocBoot/iocMotorSim# lnls-run ./st.cmd
@@@ Restarting child "./st.cmd"
@@@ The PID of new child "./st.cmd" is: 21
@@@ @@@ @@@ @@@ @@@
./st.cmd: 4: cannot open envPaths: No such file
./st.cmd: 6: Syntax error: word unexpected (expecting ")")

@@@ @@@ @@@ @@@ @@@
@@@ Received a sigChild for process 21. Normal exit status = 2

So even with the correct permissions, something seems off there.

I also tried running the provided docker-compose-motorpigcs2.yml, that I expected to work out-of-the-box, but the same happened.

Am I missing something?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions