Chown Modify the files and folders of the user and user Group property 1, to modify the owner of the file hh.c. Modify this user for Sakia all chown Sakia hh.c This applies hh.c user access to Sakia as owner 2, directory/tmp/sco Change the owner and group of this directory to Sakia and group net Chown-r sakia:net
Chown Modifying the user and user group properties of files and folders
1, to modify the owner of the file hh.c. Modify this user for Sakia all
Chown Sakia hh.c
This applies hh.c user access rights to Sakia as the owner
2, change the directory/tmp/sco owner and group of this directory to Sakia and group net
Chown-r Sakia:net/tmp/sco
chmod modifying file and folder read and write execution properties
1. Modify the hh.c file to a writable, readable executable
chmod 777 HH.C
To modify all file properties under a directory to be writable and readable executable
chmod 777 * *
Replace the folder name with the suffix name *.
Similarly, if you want to modify the properties of all HTM files
chmod 777 *.htm
2, modify the directory/tmp/sco to writable and readable executable
chmod 777/tmp/sco
To modify all folder properties under a directory to be writable and readable executable
chmod 777 *
Replace the folder name with a *.
To modify all files and folders and their subfolder properties under/tmp/sco as writable and readable executable
Chmod-r 777/tmp/sco
Can write w=4
Readable r=2
Executable X=1
777 is to have full access. You can freely combine the permissions of users and groups as needed.
The difference between Linux chown and chmod commands