chmod (change mode) changing permissions
What do you think about permissions?
[[email protected] ~]# ls-l total usage 8-rw-r--r--.1 root root 0 June 8 14:16 2.txt-rw-------. 1 root root 7728 June 6 22:11 anaconda-ks.cfg.1-rw-r--r--. NBSP; this paragraph, except the first - represents the file type, the last one . Indicates whether the file is subject to selinux limit * (SELinux if disabled,
Read permission (r)
File has only R permissions: Read \ Read file content permissions1. Only use the View Class command cat, Head, tail, less, more2. Cannot copy, that is, cannot use CP command3. Cannot move, cannot move with MV command4. Cannot edit, cannot write content using vim or Eho command5. Can not delete, delete the permissions to see the parent direct
The display information for the ll instruction is (only Nameservice1 a directory under the current directory):Drwxr-xr-x 3 HDFs hdfs 4096 April 16:19 Nameservice1The above information indicates: permissions (drwxr-xr-x 3), owning User (HDFS) and group (HDFS), size (4096), Time (April 14 16:19), name (Nameservice1).The letters in the permission have a total of 10
Tags: jpg filename default name water hang character Umask blogA file directory permission definitionFirst of all, let's meet the permissions definition of the file directory, and see the ls-l results below.We found a file or directory in front of the 10-bit information, the first bit represents the file type, there ar
Ext: The author is Baidu accountThe chmod command in a Linux system is primarily used to modify the permissions of directories and files, which are only available to the root user by default. The command is used for COMMAND + modify content + to modify the file or directory, and it has some options most commonly used is-r, meaning recursive processing, once the operation of the
Linux File and directory permissionsEach file or directory in Linux contains access rights that determine who can access and how to access these files and directories.By setting permissions, you can restrict access by only allowing users to access them, allowing users in a pre-specified group to access them, and allowing any user in the system to access them.Linu
Please download the latest version of the security package (2011-1-11), click "Set the Recycle Bin directory Permissions" and "Set Media directory Permissions" function, you can solve the following problems:
The permissions for the Recycle Bin
Linux "ls-al" displays directory permissions that differ from file permissions:Drwxrwxrwx-rwxrwxrwxIn this case, the row "D" on the directory is a directory, and the next line "-" is a file. In the permission representation of the directory, r is readable, meaning that the
Linux User Rights in the Linux operating system, root is the highest, the equivalent of Windows Administrator, with the highest privileges, can execute any command and operation, in the Linux system, By UID to distinguish the user's permission level, UID equals 0, indicating that this user has the highest privileges, that is, the administrator, the other user uid is incremented, by/etc/passwd user password file can view each user's independent Uidlinux file or
In my work one day after the execution of Chmod-r 777/home I regret very much, this do not know what to do? The heart is very anxious. At this time brainwave asked Google, finally found a way to solve this problem, but the premise is to do their own file rights backup work, and now I will explain to you the process I deal with:1. Today I will use the/home/tong directory to do experiments to see the/home/tong direc
directory or file is not displayed when you find it by default.2. File permissions0. Full explanation:The first character in Linux means that the file is a directory, a file, or a linked file, and so on.
When [ D ] is the directory
When [ - ] is the document;
If [ l ] is indicated as a linked document (link file);
If [ b ] is indicated as th
Site Directory file permissions are important to the security of the site, the following is a brief introduction to the basic settings of the Site directory file permissions.
We assume that the HTTP server is running the user and user group WWW, the site user is CentOS, and the site root
The Site Directory file permissions settings are critical to the security of the site, the following simple description of the Site Directory file permissions of the basic settings.
We assume that the HTTP server is running the user and user group is WWW, the site user is CentOS, the site root
Linux generally divides the file-accessible identities into three categories, namely Owner/group/others/ETC/PASSWD account Information/etc/shadow Personal Password/etc/group Group Name RecordChange the group you belong to, CHGRPChange the file owner, Chown. Chown can also use "Chown user.group file", that is, add a decimal point between the owners of the group "." It's OK! For example "Chown. sshd Install.log" is to modify the group ~ See? Is the use of the decimal point!chmodNumber types Change
Grammar
chmod (file,mode) parameter description
File required. Specifies the documents to be inspected.
mode is optional. Specify the new permissions.
The mode parameter consists of 4 numbers:
The first number is always 0.
The second number specifies the owner's permissions
The second number specifies the permissions of the user group to which the owner is a memb
Sorted:Huake XiaotaoHttp://www.cnblogs.com/hust-ghtao/
In Linux, files correspond to three identities (owner, user group, and others). Each identity has three permissions (R, W, and X ). What are the differences between these permissions for general files and directory files? Let's introduce it today:
1. Importance of permis
One: User and user group
File owner
User groups
The others
/ETC/PASSWD----Record the accounts on the system with general identity user and root information
/etc/group----All Group names
/etc/shadow-----Personal Password
Ls-al-------View File commands650) this.width=650; "title=" Qq20141210160217.png "alt=" wkiol1sh_rmsj76raaiwxnhvfoe395.jpg "src="/HTTP/ S3.51cto.com/wyfs02/m00/54/9f/wkiol1sh_rmsj76raaiwxnhvfoe395.jpg "/>
Supplemental ls Command
Ls-1 a ro
Recently in the development of a server-side program, the test process found a small problem to take this note.The description of the scenario is basically this: The program starts with the root user, opens a file a,fork a child process runs with a non-root user, and changes the owner of file A to run the child process; The subprocess may reopen file a while the process is runningThe problem is triggered by reopening file A, as shown here:
Let's say I put the program in the/root/test
are all combinations of "rwx" three parameters.
[R] stands for readable (read)
[W] stands for writable (write)
[x] stands for executable (execute)
2.2 How to change file properties and permissions
CHGRP: Change the group to which the file belongs
Chown: Changing the file has
chmod: Changing the permissions of a file
2.3 Permission meanings for
First, user and user group:3 Concepts: File owner (user), group, other person (others)./etc/passwd /etc/shadow /etc/group Second, the concept of file permissions:1. File attributes Drwxr-x---1 root root 4096 sep8 18:27 Install.log①②③④⑤⑥⑦Parameter description:①: Permissions R: Readable; W: writable; X: Executable or can enter the directory.②: Number of inode conne
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.