Sample Header Ad - 728x90

Make script executable: chmod +x vs. a+x vs. a+rx

-1 votes
2 answers
268 views
To make a shell script executable, there seems to exist three options: - Option 1: chmod +x script.sh - Option 2: chmod a+x script.sh - Option 3: chmod a+rx script.sh Here are two questions. Q1. What does it actually mean that the first and second options grant permission to execute, but don't grant permission to read? How does it possible in real life? Q2. Which of these options is recommended for a general case? Or, to make this question less personal, what are pros and cons of each option?
Asked by jsx97 (1347 rep)
Mar 16, 2025, 05:11 PM
Last activity: Mar 16, 2025, 05:35 PM