Common commands for Ubuntu permission management 1. chmod method 1 chomd [{ugoa} {+-=}{ rwx}] [file or directory] u stands for the user g of the file to represent the user group o of the file to represent guest all users +-= indicate adding permissions respectively, reduce permissions or grant permissions to all users with write permissions on t2.tmp files. Method 2: chmod [mode = 421] [file or folder] 4 indicates read permissions.
Common commands for Ubuntu permission management
1.chmod
Method 1
Chomd [{ugoa} {+-=}{ rwx}] [file or directory]
U indicates the user to which the file belongs.
G indicates the user group to which the file belongs.
O represents a visitor
A Represents all users
+-= Add permissions, reduce permissions, or grant permissions respectively
Grant all users the write permission to the t2.tmp file:
Method 2:
Chmod [mode = 421] [file or folder]
4 indicates read permission
2 indicates write permission
1 indicates the execution permission
For example, if the user of a file has all permissions, the group has read and execution permissions, and others have execution permissions, you can set the permission as follows:
Rwx:
2. chown [target user] [file or folder]
Change the owner of a file or directory
Change the t2.tmp file owner to lenve
3. chgrp [user group] [files or directories]
Change the group of a file or directory
4. umask [-S] specifies the default permission mask when a file is created. -S indicates the permission mask in rwx format.
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2 This article permanently updates the link address: Http://www.linuxidc.com/Linux/2015-08/121395.htm