Today to talk about Linux inside the permissions of the problem, in the Linux system, there are so several kinds of permissions, r,w,x,s,t so several kinds of permissions, the system why should have permissions this thing, Linux all files, some
Each file and directory in a Linux system has access permissions, which are used to determine who can access and manipulate files and directories.Access to a file or directory is divided into read-only, write-only, and executable three types. As an
People who have played Linux will know that there are really a lot of commands in Linux, but people who have played Linux have never bothered by the fact that Linux commands are so many, because we only need to master the commands we use most often.
I.. chmod modify FILE PermissionsEach file or directory has three groups of access rights, each group is represented by three bits, respectively, the read, write, and execute permissions of the file owner, the read, write, and execute permissions of
Linux Modify the user and group to which the file belongsUse the chown command to modify the user to which the file or directory belongs:Command: Chown user directory or file nameFor example: Chown qq/home/qq (the owner of the QQ directory under the
Common methods are as follows:sudo chmod 600xxx (only the owner has read and write permissions)sudo chmod 644xxx (owner has read and write permissions, group user only Read permissions)sudo chmod 700xxx (only the owner has read and write and Execute
I. Interpretation of file permissionsAs shown, the beginning of the-rwxrw-r--string identifies the file permissions.This string has 10 bits, which can be divided into 4 segments to interpret. Note: r--readable, w--writable, x--executable.The first
ls:is to display the file in the current directoryLL:is to display the file details in the current directory.Description of the file attributes:There are a total of file attribute fields Ten A letter composition ,The first letter indicates the type
Ls:is to display the file in the current directoryllis to display the file details in the current directory.Description of the file attributes:The file attribute field has a total of 10 letters,The first letter indicates the file type, if the letter
Modify Linux file Permissions command: chmodEach file and directory in a Linux system has access permissions, which are used to determine who can access and manipulate files and directories.Access to a file or directory is divided into read-only,
Inux chmod-x//removal of execution permissionsThe following is the detailed usage of chmod:The chmod command is used to change access rights for Linux system files or directories. Use it to control access to files or directories. There are two ways
Linux System main directory and its contents
Directory
Content
/bin
Commands required to build a minimal system (most commonly used commands)
/boot
Kernel and boot files
/dev
Linux Add Users, permissions# useradd–d/usr/sam-m SamThis command creates a user Sam, where the-D and-m options are used to generate a home directory for the login Sam/usr/sam (/usr is the parent directory where the default user home directory
Owner (user), owning group, others (other)Because Linux is a multi-tasking system, it often appears that the same machine is operated by more than one person at a time, in order to consider everyone's privacy and the work environment that everyone
When a server, both a test environment, also has a generated environment, development needs to be tested online, if the development of the production environment, then the development of the error-prone operationThe requirements are as follows:(1)
Access to a file or directory is divided into read-only, write-only, and executable three types. As an example of a file, a read-only permission means that only the content is allowed to be read, and any changes to it are forbidden. Executable
First, the server hardware configuration 1, view hard disk and partition condition # fdisk-l 2. View the usage of partition space You can view each partition size, used, available, percent used, mount status 1) default Unit is K # DF 2) More
Linux add Users, permissions-!!!!!!!!!!! -Blog Park
# useradd–d/usr/sam-m SamThis command creates a user Sam, where the-D and-m options are used to generate a home directory for the login Sam/usr/sam (/usr is the parent directory where the default
This article combs some of the common commands for Linux users and user groups.
Related configuration files:
/etc/group Store all user group information in the current system
/etc/gshadow Store passwords for all user groups in the
# useradd–d/usr/sam-m SamThis command creates a user Sam, where the-D and-m options are used to generate a home directory for the login Sam/usr/sam (/usr is the parent directory where the default user home directory resides).Assuming the current
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.