Linux Files and directories

Source: Internet
Author: User
Linux file properties

Changing the properties and permissions of a file

CHGRP: Changes the group to which the file belongs.

Chown: Change the owner of the user.

chmod: Change the permissions of the file.

Example: chmod 777. Bash

The three numbers are: owning user rights, user group permissions, other people's permissions.

Permissions are: R:4 w:2 1:x composition.

Permission meanings for directories and files:

The meaning of the permissions to the file:

  • R: You can read the contents of this file, such as text files.
  • W: You can modify the contents of this file.
  • X: can be executed.

The meaning of permissions on the directory

  • R: Has permission to read the list of directory structures, such as the LS command.
  • W: have permission to change the list of directory structures: You can add new files and directories under this directory, delete files and directories under the path (regardless of the permissions of the file), rename files and directories in that directory, and transfer files and directories within that directory.
  • X: You can enter the directory. That is, the CD command.

Linux Files and directories

Related Article

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.