What is the difference between `chown` and `chmod` in resolving 'error eacces permission denied mkdir'?

Responsive Ad Header

Question

Grade: Education Subject: Support
What is the difference between `chown` and `chmod` in resolving 'error eacces permission denied mkdir'?
Asked by:
103 Viewed 103 Answers

Answer (103)

Best Answer
(426)
`chown` changes the owner and/or group of a file or directory, while `chmod` changes the read, write, and execute permissions. If the user doesn't own the directory and doesn't have permissions, `chown` might change ownership to the user, then `chmod` would grant necessary permissions. Alternatively, `chmod` can modify permissions without changing ownership, if the appropriate permissions are granted to the user or group.