Deploy failing — "We don't have permission to execute your start command" (no Dockerfile/bin changes)
hwhelchel
PROOP

10 days ago

Deploys started failing today after working fine ~18 hours ago. Two services (web + worker) deploy from the same repo via GitHub.

Worker service error (Deploy > Create container, 00:23):

We don't have permission to execute your start command.

Add execute permissions (e.g. chmod +x) to your start command executable and try again.

Web service error: Pre-deploy command failed (bin/rails db:migrate && bin/rails sitemap:generate).

What changed since last successful deploy: One commit modifying a single Rake file (22 lines added). No changes to Dockerfiles, bin/ scripts, Gemfile, or file permissions.

What we've verified:

- All bin/ scripts are 100755 in git

- Currently running container has correct permissions (-rwxr-xr-x) on all bin files

- All database migrations are up, nothing pending

- bin/rails sitemap:generate runs fine via railway ssh

- Build step succeeds (00:08), failure is at "Deploy > Create container"

- Redeployed multiple times, same failure

Setup:

- Rails app with custom Dockerfiles (Dockerfile.web, Dockerfile.worker)

- Multi-stage builds, chown -R rails:rails /rails before USER 1000:1000

- Worker CMD: /bin/bash -lc "exec ./bin/thrust bundle exec rake solid_queue:start"

- ENTRYPOINT: /rails/bin/docker-entrypoint

Feels platform-side since nothing in our Dockerfiles or bin/ changed. Happy to share more details.

Solved

6 Replies

hwhelchel
PROOP

10 days ago

Update: Verified both commands succeed when run manually inside the container.

Web service pre-deploy command (bin/rails db:migrate && bin/rails sitemap:generate):

- db:migrate: completes with no pending migrations

- sitemap:generate: completes successfully (11,173 links, 95KB)

Both run fine via railway ssh on the currently running web container. The failure is happening in Railway's deploy pipeline before the container is accessible, not in our code.

Still seeing the same errors on every deploy attempt. No code changes to Dockerfiles, bin/ scripts, or entrypoint since the last successful deploy ~20 hours ago.


hwhelchel
PROOP

10 days ago

Worker service update: Verified start command works inside the running worker container via railway ssh.

- bin/thrust has correct permissions (-rwxr-xr-x, owned by rails:rails)

- /bin/bash -lc "exec ./bin/thrust bundle exec rake solid_queue:start" executes successfully — only error is bind: address already in use because the existing worker process already holds port 80

- No changes to Dockerfile.worker, bin/thrust, or bin/docker-entrypoint since the last successful deploy

The "We don't have permission to execute your start command" error is not reproducible inside the container. Feels like Railway's deploy step is running the command in a different context or with different permissions than the built container.


abreu
PRO

10 days ago

@hwhelchel, I was facing a similar issue and changed two settings to solve it (at least temporarily): 1) changed to use the Nixpacks (deprecated) and 2) enabled the Metal build environment.

After doing that, my build completed successfully.


9 days ago

Hello,

Thank you for reporting this. We are going to be looking into this.


Status changed to Awaiting User Response Railway 9 days ago


brody

Hello,Thank you for reporting this. We are going to be looking into this.

hwhelchel
PROOP

8 days ago

thank you


Status changed to Awaiting Railway Response Railway 8 days ago


Status changed to Awaiting User Response ray-chen 8 days ago


sam-a
EMPLOYEE

8 days ago

This should be fixed. Let us know if you still have issues.


Status changed to Solved sam-a 8 days ago


Loading...