Issue " /app/your_program.sh is not an executable file"


I’m really confused about this issue—it started happening consistently at a certain point.

Locally, I copied compile.sh and run.sh to the root dir of my project, and everything works fine. However, when running the same scripts on the remote machine, I keep encountering this issue.

I’ve already tried:

  • Setting permissions with chmod 777
  • Converting line endings using dos2unix
  • Ensuring the script has #!/bin/sh at the top

Despite these efforts, the issue persists. I haven’t made any changes to my remote configuration, so I’m unsure whether the problem is on the remote side or something in my setup.

Any insights or suggestions would be greatly appreciated!

Hey @LiAuTraver, sorry for the confusion!

You should be able to fix the issue by running this command:

chmod +x .codecrafters/*

Could you give this a try, and please let me know how it goes?

Hey, thanks for your reply! I ran the command, but unfortunately, the issue still persists. The error message was still the same and personally I don’t think that’s the problem, for compile.sh runs fine. (the problem remains :frowning: )

@LiAuTraver Looks like the fix wasn’t applied properly. I’ve re-applied it and pushed a commit to your repo:

Now you can pull the latest changes to continue. Let me know if the issue still persists.

1 Like

Wow thank you and it worked. The problem was indeed wired: in my local repo the file permission differs from the repo you cloned, actually it was more relaxed. Anyway the issue was resolved, and thank for your help! :blush:

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.