Sixth chapter Linux file permissions and directory configuration

Source: Internet
Author: User
Tags readable

(1) Type of file:

(i) ordinary documents (-);

(ii) Catalogue document (d);

(iii) connection file (L), similar to the WINDWOS system below the shortcut;

(iv) Equipment and equipment files: first, block equipment files, is some storage data to provide system random access to the interface device, such as hard disk, floppy disk;

Second, the character (character) device file, also is some serial port interface device, such as keyboard, mouse.

(v) Sockets (s), this type of file is usually used for data connections on the network;

(vi) Pipeline (fifo,pipe) (p), a special type of file, which is primarily intended to resolve errors caused by simultaneous access to a file by multiple programs.

Whether a Linux file can be executed is related to the 10 properties of its first column, which is not related to the file name at all. Of course, if the contents of the file cannot be executed, even if there is an X in the file's permissions, it cannot be executed.

(2) Change the properties and permissions of the file:

CHGRP: Change the user group that the file belongs to;

Chown: Change the file owner;

chmod: Change the permissions of the file.

For example: Chgrp bin text.c Change text.c user group to bin; Change bin owner and user group to Root:chown root:root text.c

(3) directory and file permissions meaning

(a) The permissions of the file is relatively simple: readable representation of the actual content of the file can be read, can be written to edit, add or modify the contents of the file, executable indicates that the file has permissions that can be executed by the system.

(ii) The importance of the permissions of the directory: for the readable, the right to read the directory structure list, you can use the "ls" command to display the table of contents of the directory; a readable representation has the right to change the directory structure list, to create new, delete, rename, or transfer files under the directory The executable represents whether the user can enter the directory as the working directory.

Note: If the permissions for a directory are drwxr--r--, members of the user group can only read the list of file names for that directory, but because there is no executable permission, the "LS" command displays "? ”。 Therefore, the General Web site administrator Open Directory data should be readable executable, but can not be read with the table, otherwise the general user can arbitrarily change the site data.

Sixth chapter Linux file permissions and directory configuration

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.