One of the Linux learning: viewing and modifying file permissions

Source: Internet
Author: User

1, the user's account information is all placed under the etc file.

2. File permissions

To view permissions for a folder: (Ls-ld folder name)

Column 2nd: Number of hard links to the table file (only available on Linux)

3rd Column: representing the owner

Column 4th: representing all families

5th column: Refers to the size of the file (LS-LH)

6th column: Displays the file creation time or the modified time

1th column:

The first character represents the type of a file

-: Representing ordinary files

D: Representative Directory

B: Device file (block device: U disk, optical drive, hard drive ...) )

C: Device file (character file: mouse, keyboard ....) )

L: Soft Connect (shortcut)

2nd---The >9 character represents the permissions of the file, divided into 3, 31 groups

USR Group Other (R Read, w write, x executable)

3, modify the permissions of the file-------chmod command

R------> 4

W------> 2

x------> 1

  -R------> Recursively modify permissions for files and folders inside folders

Modify permissions for CDROM---------------> Practice yourself?

4, change the owner of the file, all families. -------------->chown Command/chgrp command (the latter changes all families individually, the former can change the owner and all families)

(1), can change one at a time, can also change two at a time, when the owner and all families change, the middle with ":" or "." Separate.

Change permissions for all families individually: chgrp

          

5, under the Linux system, the file extension does not matter, and the suffix is not related (except for the specific file). ------------->file

File

One of the Linux learning: viewing and modifying file permissions

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.