← BYTES
Troubleshooting·Starter·Ref: 16.1.17

What is the purpose of `chmod` and `chown`, and when would you reach for them while troubleshooting?

Have a question about this video? Mention reference 16.1.17 when you contact us.

a.To compress and decompress files
b.They are commands for starting and stopping network services
c.`chmod` changes a file's permission bits (read/write/execute); `chown` changes a file's owner/group -- both are reached for when a 'permission denied' error turns out to be caused by genuinely incorrect file permissions or ownership, not a bug in application logic
d.They only work on directories, never individual files
Once `ls -l` has confirmed a file's current permissions/owner don't match what the application expects (e.g., a config file owned by root that the application's non-root service account can't read), `chmod` and `chown` are the tools used to actually correct that -- but only after confirming permissions really are the cause, rather than assuming it and changing them speculatively.

Find this on YouTube & Instagram

Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:

#BYTES#BYTES16117#Troubleshooting