Bird
0
0

What will be the output of ls -l file.txt after running chmod 640 file.txt on a file owned by user 'alice' and group 'staff'?

medium📝 Command Output Q13 of 15
Linux CLI - File Permissions and Ownership
What will be the output of ls -l file.txt after running chmod 640 file.txt on a file owned by user 'alice' and group 'staff'?
A-rw-r----- 1 alice staff 0 date file.txt
B-rwxr-xr-x 1 alice staff 0 date file.txt
C-rw-rw-r-- 1 alice staff 0 date file.txt
D-r--r----- 1 alice staff 0 date file.txt
Step-by-Step Solution
Solution:
  1. Step 1: Decode chmod 640 permissions

    6 = read(4)+write(2) for owner, 4 = read(4) for group, 0 = no permissions for others.
  2. Step 2: Translate to ls -l format

    Owner: rw-, Group: r--, Others: ---. So the permission string is '-rw-r-----'. The rest shows ownership and file info.
  3. Final Answer:

    -rw-r----- 1 alice staff 0 date file.txt -> Option A
  4. Quick Check:

    chmod 640 = rw-r----- [OK]
Quick Trick: Match digits to rwx: 6=rw-, 4=r--, 0=--- [OK]
Common Mistakes:
  • Mixing group and others permissions
  • Assuming execute permission is set
  • Confusing numeric values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes