Introduction to Linux file Rights Management

Source: Internet
Author: User
Tags chmod file permissions

  • File permissions


  • 2. File permissions

    File permissions are defined primarily for three types of objects

    Owner: Master, u

    Group: Genus, G

    Other: Others, O

    Each file has three permissions defined for each type of visitor

    R:readable

    W:writable

    X:excutable

    File:

    R: Use the File View class tool to get its contents

    W: can modify its contents

    X: This file can be brought to the kernel to start as a process

    Directory:

    R: You can use LS to view the list of files in this directory

    W: You can create files in this directory or delete files in this directory

    X: You can use Ls-l to view a list of files in this directory, and you can enter this directory by CD

    Permission entries

    File type

    Read

    Write

    Perform

    Read

    Write

    Perform

    Read

    Write

    Perform

    Character representation

    ( d|l|c|s|p )

    (r)

    (W)

    (x)

    (r)

    (W)

    (x)

    (r)

    (W)

    (x)

    Digital representation


    4

    2

    1

    4

    2

    1

    4

    2

    1

    Permission Assignment


    File owner

    File belongs to group user

    Other users

    Depending on the binary algorithm, set permissions on the file as follows:

    3. Command

    chmod (change model) + level + Flie

    Eg:chmod 777 PMA

    Of course each file has its own fixed permissions when it is initially created, not for each set, how is it implemented?

    The answer is: when the system creates a file or folder, there will be a ' umask ' reverse mask reverse mask that is different for each user, and you can view the current user's value by entering ' umask '.

    The initial setup file permissions are computed as: 777-022=755 is represented as W:7 RWX g:5 rw-o:5 rw-.


    Introduction to Linux file Rights Management

    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.