File Permissions and files

Source: Internet
Author: User

Learn linux-By doing the file permissions and file sharing

August 24, 2016

14:21

File permissions and file sharing:

1. Access rights:

Note: For directories, x means that you can search for this directory, so if you do not have permission to execute the directory, you cannot use the LS-L command to list the contents of the directory or use the CD command to change the directory to the current directory.

2. Change the file access permissions:

chmod [Options] Octal-mode file-list

chmod [Options] symbolic-mode file-list ==> chmod u+x file

3. Special Privilege Level:

SUID (Set-user-id) bit: To set the execution bit, when the command executes, the user who is currently launching the command has the same permissions as the execution file owner.

chmod 4xxx File-list

chmod u+s File-list

SGID (Set-group-id) bit: To set the execution file to have the same access rights as the group to which the file belongs

chmod 2xxx File-list

chmod g+s File-list

Sticky bit: It allows the file to be moved or deleted only by its owner or Superuser.

chmod 1xxx File-list

chmod +t File-list

4. Hard link: It is the index node that points to the file, that is, the index node of the directory entry that establishes the hard-linked file with the same file is the same.

Implemented with the LN command, provided that the user who executes the LN command has execute permissions in all directories that are contained in the path name that points to the file.

Hard links can not establish links between files in different file systems.

5. Symbolic Link: The Symbolic link file contains the path information of the source file in the file structure, with a size of 5 bytes.

Implemented with the Ln-s command.

Symbolic links can establish links between files in different file systems. However, the source file path information cannot be changed.

File Permissions and files

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.