Bird
0
0

After running chmod u=rwx,g=rx,o= file.txt, what will be the permission string shown by ls -l file.txt?

medium📝 Command Output Q5 of 15
Linux CLI - File Permissions and Ownership
After running chmod u=rwx,g=rx,o= file.txt, what will be the permission string shown by ls -l file.txt?
A-rwxr-xr-x 1 user group 0 date file.txt
B-rwxr-x--- 1 user group 0 date file.txt
C-rw-r--r-- 1 user group 0 date file.txt
D-rwxrwxrwx 1 user group 0 date file.txt
Step-by-Step Solution
Solution:
  1. Step 1: Analyze symbolic permissions set

    Owner (u) = rwx, Group (g) = r-x, Others (o) = no permissions.
  2. Step 2: Convert to permission string

    Owner: rwx, Group: r-x, Others: --- results in '-rwxr-x---'.
  3. Final Answer:

    -rwxr-x--- 1 user group 0 date file.txt -> Option B
  4. Quick Check:

    u=rwx,g=rx,o= means others no permission [OK]
Quick Trick: Use u=, g=, o= to set exact permissions [OK]
Common Mistakes:
MISTAKES
  • Assuming others get read permission
  • Confusing g=rx with g=rwx
  • Using numeric mode incorrectly

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes