Lab Building -4-linux File permissions

Source: Internet
Author: User

$ ls-l/* View file Permissions */

Each line format means: < file type and Permissions link number owner user group file size last modified time file name >

File types and permissions such as:

Explain:

Soft connect: Similar to a shortcut under Windows

Read permissions: Cat file_name

Write permission: gedit file_name

Execute Permissions: Binary program file or script file

notice:< A directory should have both read and Execute permissions to open, and a directory with write permission to allow other files to be created in it >

Other common uses of the LS command: slightly #with the

Change file Owner

$ cd/home/user_name

$ sudo chown user_name file_name #此处user_name为文件的原归属者

$ CP file_name/home/user_name #此处user_name为要重新归属的用户名

File Permission binary representation

Change file permissions: $ chmod file_name #700: Each number in turn represents: Owner, user group, other user

Another way to change file permissions, add and subtract assignment operations: $chmod go-rw file_name (Skip)

Lab Building -4-linux 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.