Question
What is the difference between `chown` and `chmod` in resolving 'error eacces permission denied mkdir'?
Asked by: USER1297
103 Viewed
103 Answers
Answer (103)
`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.