Linux - Comment attribuer une autorisation d’exécution à un fichier .sh

Linux - Comment attribuer une autorisation d'exécution à un fichier .sh

Sur * nix, vous pouvez utiliserchmod +x file.sh pour rendre un fichier.sh exécutable.

Terminal

$ ls -lsah
total 12K
4.0K drwxr-xr-x  2 example example 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 example example 4.0K Feb   5 10:24 ..
4.0K -rw-r--r--  1 example example   67 Feb   5 10:24 run-script.sh

$ chmod +x run-script.sh

$ ls -lsah
total 12K
4.0K drwxr-xr-x  2 example example 4.0K Feb   5 10:24 .
4.0K drwxr-xr-x 17 example example 4.0K Feb   5 10:24 ..
4.0K -rwxr-xr-x  1 example example   67 Feb   5 10:24 run-script.sh

Exemple ci-dessus, attribuez une autorisation d'exécution+x àrun-script.sh

Références