Permissions and Permissions Management
Rights Management:
R:
W:
X:
Three types of users:
U: Owner
G: Genus Group
O: Other users
Chown: Change file owner (only administrators can use this command)
# chown USERNAME File,...
-R: Modify the owner of the directory and its internal files
--reference=/path/to/somefile,... Specify the file or directory as the reference and set the operation's file or directory to the same
Chown username:grpname File,... At the same time change the owner of the file, and the name of the group
Chown USERNAME. GRPNAME file,... At the same time change the owner of the file, and the name of the group
#chgrp GRPNAME file,... Change the file genus Group
-R : Recursively modifies the genus of directories and their internal files
--reference=/path/to/somefile,... Specify the file or directory as the reference and set the operation's file or directory to the same
chmod: Modify permissions for a file
Modify permissions for three categories of users:
chmod MODE File,...
-R: Recursive modification
--reference=/path/to/somefile,...
To modify the permissions of a class of users:
U,g,o,a
chmod [u,g,o,a]=mode file,...
Modify some or some bit permissions for a class of users:
U,g,o,a
chmod [U,g,o,a]+|-mode file,...
Umask: Masking Code
#:umask 022
$:umask 023
Files: 666-umask
Catalog: 777-umask
The file cannot have Execute permission by default, and if the result has Execute permission, it will add 1 to its permission;
User's login:
The type of shell that stands in the user's Landing angle:
Log-in Shell:
Log in normally via a terminal
Su-username
Su-l USERNAME
Non-logon shell:
Su USERNAME
Open Command Window under graphics terminal
Shell scripts that are executed automatically
Bash configuration file:
Global configuration:
/etc/profile,/etc/profile.d/*.sh,/ETC/BASHRC
Personal configuration:
~/.bash_profile, ~/.BASHRC
File for Profile class:
Setting Environment Variables
Run a command or script
Files of the BASHRC class:
Setting Local Variables
Defining command aliases
How does the login shell read the configuration file?
/etc/profile-->/etc/profile.d/*.sh--~/.bash_profile-/ETC/BASHRC
How does a non-logon shell read a configuration file?
~/.BASHRC--/ETC/BASHRC-/etc/profile.d/*.sh
BASH: script interpreter
This article is from the "11913800" blog, please be sure to keep this source http://11923800.blog.51cto.com/11913800/1840070
Linux Learning Notes-permissions and permissions management