Siege Lion on the Way (iii) Linux (11)---User and user groups, file permissions, directory configuration

Source: Internet
Author: User

First, user and user group:

3 Concepts: File owner (user), group, other person (others).

/etc/passwd <== to store all user names

/etc/shadow <== Store Personal password

/etc/group <== Store all the group names

Second, the concept of file permissions:

1. File attributes <== using Ls-al command

Drwxr-x---1 root root 4096 sep8 18:27 Install.log

①②③④⑤⑥⑦

Parameter description:

①: Permissions <== A total of 10 bits, the first digit represents the file type, and the next 9 bits three groups, respectively, representing the owner rights, user group permissions, other people permissions.

R: Readable;  W: writable; X: Executable or can enter the directory.

②: Number of inode connected to this file

③: Owner

④: User groups

⑤: File Size

2, how to modify the properties and permissions of the file? (Requires login with root permission)

CHGRP: Change the user group to which the file belongs. <== CHGRP Users Install.log

Chown: Change the file owner. <== chown Vbird Install.log

chmod: Change the permissions of the file.  <== chmod 777 Install.log; or chmod a+w Install.log

3, the file's permission meaning:

R: can be read.

W: You can edit, add, or modify the contents of a file, but you cannot create, delete, or rename files.

X: Executable.

4. The permission meaning of the directory:

R: Read the permissions of the directory structure list, you can use the LS command.

W: Change permissions on the directory structure list, such as new file or directory, delete, rename, move location, and so on.

X: Whether you can enter the directory to make it a working directory.

5. Types and extensions of Linux files:

A, file-, directory D, connection file L, block device file B, character device file C, socket s, Pipe F.

B, extension: The extension under Linux has no special meaning, just as a token, so that the user can know the purpose of the file.

C. The maximum length of a single file or directory name is 255 characters; The full path is a maximum of 4,096 characters.

D, the file name as far as possible to avoid some special symbols such as: *?><;&! []/\ ' "() {}+-, etc.).

Third, the directory configuration of Linux:

1. Directory Configuration standard: FHS

2, because the root directory/is important, so the directory should be as small as possible, because the larger the partition, the greater the chance of error.

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.