./ZeroNet.sh: line 12: runtime/bin/python3: Permission denied
Step 1: Please describe your environment
- ZeroNet version: latest? just downloaded https://github.com/ZeroNetX/ZeroNet/releases/latest/download/ZeroNet-linux.zip
- Operating system: Debian
- Tor status: not available
Step 2: Describe the problem:
Steps to reproduce:
As a user
cd $home;wget --no-check-certificate -c https://github.com/ZeroNetX/ZeroNet/releases/latest/download/ZeroNet-linux.zip && unzip ZeroNet-linux.zip && rm -f ZeroNet-linux.zip && mv ZeroNet* zeronet;cd zeronet;chmod +x ZeroNet.sh;./ZeroNet.sh --help
Result:
./ZeroNet.sh: line 12: runtime/bin/python3: Permission denied
$ python3 ./ZeroNet.sh --help
Result:
File "/home/user/zeronet/./ZeroNet.sh", line 2 SCRIPT_DIR=$( cd ${0%/*} && pwd -P ) ^ SyntaxError: invalid syntax
Workaround was to replace that "runtime/bin/python3" inside ZeroNet.sh by "python3"
@slrslr You have to deploy it as
./ZeroNet.sh --help
Not python ./ZeroNet.sh --help
I did and it failed with mentioned Permission error.
Is python available ?
Try python --version
If yes
Try chmod +x ZeroNet.sh
Retry start cmd
./ZeroNet.sh
python is not available, only python3:
python3 --version
Python 3.9.2
$ chmod +x ZeroNet.sh;./ZeroNet.sh --help
./ZeroNet.sh: line 12: runtime/bin/python3: Permission denied
Maybe the command inside the script is wrong?
runtime/bin/python3 "$SCRIPT_DIR/$SCRIPT" --dist_type bundle_linux64 "$@"
Are you executing this as root ?
sudo chmod +x ZeroNet.sh
ZeroNet.sh already had executable permission for the current user: -rwxr-xr-x
Maybe python3 not (runtime/bin/python3):
Access: (0644/-rw-r--r--) Uid: ( 1000/ me) Gid: ( 1000/ me)
When instead of runtime/bin/python3 i use python3, then i see:
- Starting ZeroNet...
I have mentioned:
Maybe the command inside the script is wrong?
runtime/bin/python3 "$SCRIPT_DIR/$SCRIPT" --dist_type bundle_linux64 "$@"
Workaround was to replace that "runtime/bin/python3" inside ZeroNet.sh by "python3"
Duplicate of #146.

Set Python3 as allow executing file as program and it worked

You just have to give all executable files permission to run as programs.
Ok thanks you can close this
https://github.com/HelloZeroNet/ZeroNet/wiki/Running-ZeroNet-on-VPS
@canewsin can you please apply this into source file?
Workaround was to replace that "runtime/bin/python3" inside ZeroNet.sh by "python3"
I have faced this issue again after downloading current ZNX from https://github.com/ZeroNetX/ZeroNet/releases/latest/download/ZeroNet-linux.zip.
Also maybe do the same for ../runtime/bin/openssl https://github.com/ZeroNetX/ZeroNet/issues/199 Since it is second error seen on my Debian 11 (Stable) Linux with stock python3.