Bird
0
0

You try sudo chown alice: file.txt but get an error. What is wrong?

medium📝 Debug Q7 of 15
Linux CLI - File Permissions and Ownership
You try sudo chown alice: file.txt but get an error. What is wrong?
AFile.txt does not exist
BYou must specify group name after colon
CTrailing colon without group name is invalid syntax
DYou cannot change owner without changing group
Step-by-Step Solution
Solution:
  1. Step 1: Understand chown syntax for owner and group

    The syntax is owner:group. A trailing colon without group is invalid.
  2. Step 2: Identify error cause

    Using alice: with no group after colon causes syntax error.
  3. Final Answer:

    Trailing colon without group name is invalid syntax -> Option C
  4. Quick Check:

    Trailing colon error = D [OK]
Quick Trick: No trailing colon without group in chown [OK]
Common Mistakes:
MISTAKES
  • Leaving colon with no group
  • Assuming group is optional after colon
  • Ignoring file existence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes