Bird
0
0

What is the expected result when a non-root user runs chown alice:developers /var/log/syslog?

medium📝 Command Output Q5 of 15
Linux CLI - File Permissions and Ownership
What is the expected result when a non-root user runs chown alice:developers /var/log/syslog?
AThe ownership changes successfully to user alice and group developers
BThe command runs silently but no changes are made
CThe group changes but the owner remains the same
DAn error occurs: Operation not permitted
Step-by-Step Solution
Solution:
  1. Step 1: Understand permissions

    Only root or users with appropriate privileges can change file ownership.
  2. Step 2: Running as normal user

    A normal user lacks permission to change ownership, so the command fails.
  3. Step 3: Expected error

    The typical error is "Operation not permitted" indicating insufficient privileges.
  4. Final Answer:

    An error occurs: Operation not permitted -> Option D
  5. Quick Check:

    Try running without sudo [OK]
Quick Trick: Only root can change ownership [OK]
Common Mistakes:
MISTAKES
  • Assuming normal users can change ownership
  • Expecting group to change without permissions
  • Ignoring error messages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes