just icon indicating copy to clipboard operation
just copied to clipboard

Error: Recipe with shebang #!/usr/bin/env bash execution error: Permission denied (os error 13)

Open dmitriyl-xceleration opened this issue 8 months ago • 2 comments

Hello, an error occurred during execution. Please look at the details:

bash-test:
    #!/usr/bin/env bash
    set -euxo pipefail
    var='Hello'
    echo "$var!"
just bash-test
error: I/O error in runtime dir `/run/user/0/just`: Permission denied (os error 13)
sudo just bash-test
+ var=Hello
+ echo 'Hello!'
Hello!
just --version
just 1.40.0
cat /etc/os-release
NAME="Amazon Linux"
VERSION="2023"
ID="amzn"
ID_LIKE="fedora"
VERSION_ID="2023"
PLATFORM_ID="platform:al2023"
PRETTY_NAME="Amazon Linux 2023.6.20250123"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2023"
HOME_URL="https://aws.amazon.com/linux/amazon-linux-2023/"
DOCUMENTATION_URL="https://docs.aws.amazon.com/linux/"
SUPPORT_URL="https://aws.amazon.com/premiumsupport/"
BUG_REPORT_URL="https://github.com/amazonlinux/amazon-linux-2023"
VENDOR_NAME="AWS"
VENDOR_URL="https://aws.amazon.com/"
SUPPORT_END="2028-03-15"

uname -r
6.1.124-134.200.amzn2023.x86_64

Similar issue: https://github.com/casey/just/issues/1611

dmitriyl-xceleration avatar Apr 23 '25 16:04 dmitriyl-xceleration

Does this command work?

XDG_RUNTIME_DIR=/tmp just bash-test

W1M0R avatar May 28 '25 08:05 W1M0R

Does this command work?

XDG_RUNTIME_DIR=/tmp just bash-test

Yes, it works!

dmitriyl-xceleration avatar May 28 '25 15:05 dmitriyl-xceleration

Check out #2798. I added a --tempdir command-line option, which can also be configured with JUST_TEMPDIR, which can be used to globally override where shebang and script recipes are written. I also added documentation explaining the different ways the temporary directory can be configured.

casey avatar Jun 29 '25 21:06 casey