How to change the file owner and group in the Linux system? In this article, we will change the owner and group of files in the Linux/Unix system using the terminal. To change the file owner and group, we use the chown command in the Linux operating system. We know that Linux is a multiuser operating system so every file or directory belongs to an owner and group. To change ownership of files or directories we use the chown command in the Linux system. This command is also available in the IBM i operating system. The chgrp command is also used to change only the group ownership of the file in the Linux system. Syntax The general syntax of the chown command is as follows chown [OPTION]... [OWNER] [: [GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE... A brief description of options available in the chown command: ...
How to change group ownership of a file in the Linux system? In this article, we will learn to add groups, delete groups, and change the group ownership of a file, group of files, or directories. We know that Linux is a multiuser operating system so every file or directory belongs to an owner and group. To change ownership of files or directories we use chown (change ownership) command and to change the group ownership of files or directories we use the chgrp command. The chgrp (change group) command is used to change the group ownership of files or directories in the Linux/Unix operating system. syntax The general syntax of the chgrp command is as follow: chgrp [OPTION]... GROUP FILE... chgrp [OPTION]... --reference=RFILE FILE... A brief description of options available in the chmod command: Option ...