Linux file properties
Changing the properties and permissions of a file
CHGRP: Changes the group to which the file belongs.
Chown: Change the owner of the user.
chmod: Change the permissions of the file.
Example: chmod 777. Bash
The three numbers are: owning user rights, user group permissions, other people's permissions.
Permissions are: R:4 w:2 1:x composition.
Permission meanings for directories and files:
The meaning of the permissions to the file:
- R: You can read the contents of this file, such as text files.
- W: You can modify the contents of this file.
- X: can be executed.
The meaning of permissions on the directory
- R: Has permission to read the list of directory structures, such as the LS command.
- W: have permission to change the list of directory structures: You can add new files and directories under this directory, delete files and directories under the path (regardless of the permissions of the file), rename files and directories in that directory, and transfer files and directories within that directory.
- X: You can enter the directory. That is, the CD command.
Linux Files and directories