Challenge - 5 Problems
Chown Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate2:00remaining
What is the output of this chown command?
You run the command
chown alice file.txt on a file owned by user bob. What will happen?Linux CLI
ls -l file.txt chown alice file.txt ls -l file.txt
Attempts:
2 left
💡 Hint
Think about what happens when you specify only a user in chown.
✗ Incorrect
When you use
chown alice file.txt, only the owner changes to alice. The group stays the same.💻 Command Output
intermediate2:00remaining
What does this chown command do?
What is the effect of
chown alice:developers file.txt?Linux CLI
ls -l file.txt chown alice:developers file.txt ls -l file.txt
Attempts:
2 left
💡 Hint
Look at the syntax user:group in chown.
✗ Incorrect
The syntax
user:group changes both owner and group.💻 Command Output
advanced2:00remaining
What error does this chown command produce?
You run
chown alice: file.txt but get an error. What is the error?Linux CLI
chown alice: file.txt
Attempts:
2 left
💡 Hint
Check the syntax when specifying user and group with a colon.
✗ Incorrect
A trailing colon with no group causes chown to look for a group named empty string, which is invalid.
💻 Command Output
advanced2:00remaining
What is the effect of this recursive chown command?
What happens when you run
chown -R alice:staff /home/alice?Linux CLI
chown -R alice:staff /home/alice
Attempts:
2 left
💡 Hint
What does the -R option do in chown?
✗ Incorrect
The -R option applies ownership changes recursively to all files and directories inside the target.
💻 Command Output
expert3:00remaining
What is the output of this chown command with symbolic link?
Given a symbolic link
link.txt pointing to file.txt, what does chown -h alice link.txt do?Linux CLI
ls -l link.txt chown -h alice link.txt ls -l link.txt ls -l file.txt
Attempts:
2 left
💡 Hint
The -h option affects symbolic links differently than normal files.
✗ Incorrect
The -h option changes the ownership of the symbolic link itself, not the target file.