Explain the difference between ‘chmod’ and ‘chown’ commands in Linux/Unix?

1 Answers
Answered by suresh

Difference between 'chmod' and 'chown' commands in Linux/Unix - Shell Scripting Interview Question

Difference between 'chmod' and 'chown' commands in Linux/Unix

The 'chmod' command in Linux/Unix is used to change the permissions of a file or directory. It allows you to set who can read, write, and execute the file.

On the other hand, the 'chown' command is used to change the owner of a file or directory. It allows you to transfer ownership of the file from one user to another.

So, in summary, 'chmod' controls the permissions of a file, while 'chown' controls the ownership of a file in Linux/Unix.

Answer for Question: Explain the difference between ‘chmod’ and ‘chown’ commands in Linux/Unix?