#.gradlew Permission denied

22 messages · Page 1 of 1 (latest)

jagged ember
#

I'm getting ./gradlew: Permission denied when deploying my JVM project from GitHub. This is the command that Railway (correctly) has detected it needs to use, but it doesn't have the permission. Usually this is solved with chmod +x gradlew but I don't think I can do that in Railway.

lyric creek
#

Heya

Can you make an issue here with your repo + error so we can have a look?

#

Yea or chmod it and commit it to git like Milo said?

jagged ember
#
#11 0.385 /bin/bash: line 1: ./gradlew: Permission denied
#11 ERROR: executor failed running [/bin/bash -ol pipefail -c ./gradlew build]: exit code: 126
 
-----
> [stage-0 7/7] RUN --mount=type=cache,id=s/9a69f1b2-9260-487e-8994-f59c0502ad69-gradle,target=.gradle ./gradlew build:
-----
executor failed running [/bin/bash -ol pipefail -c ./gradlew build]: exit code: 126
 
Error: Docker build failed

This is the important bit and the repo is https://github.com/BanDev/Notify

I'll make an issue there if it's easier

GitHub

A Discord bot written in Kotlin to send notifications when people join voice channels. - GitHub - BanDev/Notify: A Discord bot written in Kotlin to send notifications when people join voice channels.

lyric creek
#

Then commit it

jagged ember
#

The chmod is done in the environment that is running it, isn't it? So railway's environment would have to chmod it

lyric creek
#

Shouldn't matter where. If you chmod it you're giving it read/write/etc perms

#

Which will persist into git

#

So, in theory either of us could do it, but we're not going to be on the hook for file permission errors sorry

#

So, you'll have to do it

jagged ember
#

I'm not sure where to do this then because before when I've done it in GitHub actions, I just add chmod +x gradlew as a line to execute

lyric creek
#

Clone it, run that command, commit up the changes

jagged ember
#

Thank you - I'll get a linux environment to try and get back to you

gilded pine
jagged ember
lyric creek
#

Yay!

jagged ember
gilded pine
#

ah shit, mb lol