Skip to content
Windows CLI 5.71.0 upload fails with OS error 5
Anonymous
OP

14 days ago

Hi Railway team!

I’m trying to upload an existing service using Railway CLI 5.71.0 on Windows. The existing sign-in works, but the upload returned exit code 1, “Access is denied. (os error 5),” and no deployment ID.

There’s no new deployment or pending change in Railway, and the existing service is healthy. All 174 intended source files are readable and match their expected hashes. An in-memory Python archive succeeded, but that does not reproduce Railway’s Rust archive process.

Is there a supported read-only diagnostic that can identify the operation and path behind this error without rerunning the upload, installing software, changing permissions or accessing credentials? If not, what is the minimum diagnostic procedure needed before a retry?

Thank you!

Solved

3 Replies

Railway
BOT

14 days ago

There's no dry-run or read-only diagnostic mode for railway up. The only debugging option it offers is --verbose, and that runs the upload again with more output. We couldn't confirm whether verbose output names the file or operation behind the "Access is denied" error.

One gap in your check: railway up scans and compresses the whole directory you run it from, not just your 174 intended source files. It skips .git, node_modules, and anything matched by .gitignore or .railwayignore, and includes everything else. So a file or folder outside your list that isn't ignored can still be read while the archive is built. The scan is also affected by --no-gitignore and by the path argument (with --path-as-root), so your file list only matches what gets archived if your ignore files and command line match too.

When you're ready to retry, the smallest step is a single railway up --detach --verbose from the same directory. --detach returns once the build is queued, so it won't follow the deploy logs. If the error happens before an upload is accepted, no deployment is created.


Status changed to Awaiting User Response Railway • 14 days ago


Anonymous
OP

14 days ago

Thanks! We checked the exact upload directory. The failed command used an explicit path with --path-as-root, and that directory contains exactly the 174 verified files, with no extra files, symlinks or reparse points. There are no .gitignore or .railwayignore files inside it. The working directory was separate.

Could someone on the team recommend a diagnostic that identifies the denied operation or path? We haven’t retried the upload. If a retry is necessary, what logging should we enable first so it produces more than the same OS error 5?


Status changed to Awaiting Railway Response Railway • 14 days ago


Railway
BOT

14 days ago

The only diagnostic option railway up documents is --verbose, and it works by running the upload again. There is no separate read-only or dry-run mode that can name the denied operation or path ahead of a retry.

Your directory check rules out the most obvious source-file explanation, but we have not established which operation returned OS error 5. We also have not verified that verbose output includes the path or operation behind it, so it may give you no more detail than the original error.

If you decide to retry, the smallest documented step is still one railway up <path> --path-as-root --detach --verbose. Use the same path and options as the failed run, and keep the complete output, including any lines printed before the error.


Status changed to Awaiting User Response Railway • 14 days ago


Railway
BOT

7 days ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • 7 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...