Chown modify user and user group attributes of files and folders
1. The owner of the HH. c file to be modified. All users whose names are modified to sakia
Chown sakia HH. c
In this way, the user access permission of HH. C is applied to sakia as the owner.
2. Change the owner and group of the/tmp/sco directory to sakia and group net.
Chown-r sawn: net/tmp/sco
Chmod modifies the read/write execution attributes of files and folders
1. Change the HH. c file to writable, readable, and executable.
Chmod 777 HH. c
To modify the attributes of all files in a directory to writable and executable
Chmod 777 *.*
Replace the folder name with the suffix.
Similarly, if you want to modify the attributes of all HTM files
Chmod 777 *. htm
2. Change/tmp/sco directory to writable and readable and executable
Chmod 777/tmp/sco
To modify the attributes of all folders in a directory to writable and executable
Chmod 777 *
Replace the folder name *.
To modify the attributes of all files and folders in/tmp/sco and Their subfolders to writable, readable, and executable
Chmod-r 777/tmp/sco
Writeable W = 4
Readable r = 2
Executable x = 1
777 means that you have full permissions. Users and group permissions can be freely combined as needed