Which command is used to grant execute permission to the group for a file named “script.sh” in Linux?
Note
The command used to grant execute permission to the group for a file named "script.sh" in Linux is: chmod g+x script.sh
Explanation of the options provided:
- chmod g+x script.sh: Grants execute (+x) permission to the group (g) for the file script.sh.
- chmod u+x script.sh: Grants execute permission to the owner (u) of the file script.sh.
- chmod o+x script.sh: Grants execute permission to others (o or everyone else) for the file script.sh.
- chmod a+x script.sh: Grants execute permission to all (a, which stands for owner, group, and others) for the file script.sh.