compdemocracy / polis

:milky_way: Open Source AI for large scale open ended feedback
https://pol.is
GNU Affero General Public License v3.0
754 stars 173 forks source link

'Permission Denied' error when running math service on Linode server #1684

Open metasoarous opened 1 year ago

metasoarous commented 1 year ago

Discussed in https://github.com/compdemocracy/polis/discussions/1683

Originally posted by **@TechnoGecko** May 12, 2023 So I've built the Polis container on a server, and all the services seem to run fine except for the math service. When it gets to this Dockerfile, which has `CMD ["./bin/run"]` at the bottom, the terminal outputs: ``` polis-dev-math-1 | /usr/local/bin/entrypoint: line 21: /app/bin/run: Permission denied polis-dev-math-1 exited with code 126 ``` Is this a pathing issue maybe? I'm running the command `sudo docker compose up --build` from the server as the root user, so I'm confused as to why I'd be running into permission problems. Any ideas/help would be greatly appreciated, and I can provide more info if needed. Thank you
metasoarous commented 1 year ago

Hi @TechnoGecko. Thanks for reporting this.

I'm not sure what might be causing this, but I would suggest trying to first set up docker to run as a non-root user (that is, without sudo). This shouldn't be a problem, and if it is, then I'd consider it a bug, but there are details pertaining to volume mapping that might be leading to issues running as root.

Any other info you can provide about OS you're running on, docker & docker compose versions, etc?

Thanks again

TechnoGecko commented 1 year ago

So it seems like this should have been obvious to me, but I'm fairly new to Linux environments: I had to run chmod +x <filename> on the /math/bin/run file and the math server spins up just fine now.