Bird
0
0

You want to change the owner to carol and the group to staff for all files and folders inside /data/project recursively. Which command should you use?

hard📝 Application Q15 of 15
Linux CLI - File Permissions and Ownership
You want to change the owner to carol and the group to staff for all files and folders inside /data/project recursively. Which command should you use?
Achown -r carol:staff /data/project
Bchown carol staff /data/project -R
Cchown carol:staff /data/project
Dchown -R carol:staff /data/project
Step-by-Step Solution
Solution:
  1. Step 1: Understand recursive ownership change

    The -R option applies ownership changes to all files and folders inside the given directory recursively.
  2. Step 2: Check correct syntax for user and group

    Use user:group format to set both owner and group at once.
  3. Step 3: Verify options order and spelling

    chown -R carol:staff /data/project uses -R correctly and the right syntax. chown carol staff /data/project -R has wrong order and missing colon. chown carol:staff /data/project misses recursive flag. chown -r carol:staff /data/project uses lowercase -r which is invalid.
  4. Final Answer:

    chown -R carol:staff /data/project -> Option D
  5. Quick Check:

    Use -R and user:group for recursive ownership [OK]
Quick Trick: Use -R and user:group to change ownership recursively [OK]
Common Mistakes:
  • Forgetting the -R flag for recursion
  • Using lowercase -r instead of -R
  • Separating user and group without colon
  • Placing options after the path

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes