Linux-Common commands (2) permission management commands, linux-permission management
Permission management command: chmod
Command name: chmod
Command: change the permisssions mode of a file
Command path strength:/bin/chmod
Execution permission: All Users
Function Description: Create a new directory-p recursive Creation
Syntax: chmod [{Ugoa}{+-=}{Rwx}] [File or directory]
[Mode = 421] [File or directory]
-R recursive Modification
Number of Permissions
R ---- 4
W ---- 2
X ---- 1
Rwxrw-r --
7 6 4
Example:
$ Chmod g + w testfile
Grant the write permission to the group to which the file testfile belongs.
$ Chmod-R 777 testdir
Modify the directory testdir and the files in the directory to grant all permissions to all users.
----------------------------------------------------------------------------------
Permission management commands: Chown
Command name: chowm
Command: change file ownership
Command path strength:/bin/chown
Execution permission: All Users
Function Description: Change the owner of a file or directory.
Syntax: chown [user] [file or directory]
----------------------------------------------------------------------------------
Permission management commands: Chgrp
Command name: chowm
Command: change file group ownership
Command path strength:/bin/chowm
Execution permission: All Users
Function Description: Change the group to which a file or directory belongs.
Syntax: chown [user] [file or directory]
----------------------------------------------------------------------------------
Permission management commands: Umask
Command name: umask
The user file-creation mask
Command path strength: shell built-in commands
Execution permission: All Users
Function Description: displays and sets the default permissions for files.
Syntax: umask [-S]
-S: displays the default permission for creating a new file in rwx format