Each file and directory in a Linux system has access permission to determine who can access and manipulate files and directories in any way.
File or directory access is divided into read-only, write-only and executable three kinds. In the case of a
The mode of the fileWhen you use the LS-L command to view directory content[Email protected] cmdline]$ ls-l/etc/passwd-rw-r--r-- 1 root root 1917 Jul 2 15:01/etc/passwdThe first column field is the file mode. The first character represents the file
Command note chmod, umaskChange the chmod format: chmod [who] [+ 1-1 =] [mode] fileName parameter: who = u, g o, a mode: +-= permission alphanumeric combination: R-4 W-2 X-1 r-x-5 r --- 4 -- X-1 # chmod u = rwx, g = r --, o = r -- 123.txt# chmod 744
Chmod: Change File Permissions
Symbol mode:
The general format of the CHMOD command is:Chmod [who] OPERATOR [permission] filename
Who indicates:U file owner permissionG. permissions of users in the same groupO other User PermissionsA All users
I. Description of permissions-rw-r–r–: This is the permission bit for a file. Let's start with this permission bit:First bar: Specifies the file type, which indicates that the file is a normal file. (Most of the files you create are normal files or
This article mainly introduces some Linux shell in the relevant knowledge summary, so that the basics of Linux introductory learning, need friends can refer to the
Once a file is created, it has three ways to access it:
1) Read, you can display
Once a file is created, it has three ways to access it:1) Read, you can display the contents of the file.2) write, you can edit or delete it.3 Execute if the file is an S H e l l script or program.The permissions of a file can be grouped into three
When creating a file, the system saves all information about the file, including:
• File location.
• File type.
• File length.
• Which User owns the file and which user can access the file.
• I node.
• File modification time.
• File Permission bit.
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.