Linux File Permissions property settings

Source: Internet
Author: User

1 file permission property settings2     3 1. Chown command4 chrep Command5 The chown command alters the owner of a file or directory and the group it belongs to, which can authorize a user to become the owner of the specified file or to change the group to which the file belongs. 6 The user can be a user or user D, and the user group can be either a group name or a group ID. File names can have a list of files separated by spaces, and wildcard characters can be included in the file name. 7 8 This command can only be used by the file owner and the superuser. 9 GrammarTen chown (option) (parameter) One Options A - C: The effect is similar to-V but returns only the part of the change.  - -F: No error message is displayed.  - - H: Modify only the files that are connected to the symbol, without modifying any other related files.  the -R: Recursive processing, all files and subdirectories under the specified directory are processed together; - -V: Displays the instruction execution process.  - --version Displays version information.  - Parameters + User: Group: Specify owner and owning workgroup. When the "omit" group, only the file owner is changed; - file: Specifies the list of files to change for the owner and workgroup. Supports multiple files and directories, and supports shell wildcard characters.  + Example A change the file master of/usr/meng and all files and subdirectories below to Liu: at chown-r Liu/usr/meng - 2. Stat command - The Stat command is used to display the status information of a file, more detailed than the file information of the LS output -  - 3. chmod command - the chmod command is used to change the permissions of a file or directory. In the UNIX system family, the control of file or directory permissions is distinguished by reading, writing, and executing 3 general permissions, with 3 special permissions in available for use. Users can use the CHMOD directive to change the permissions of the file and directory, set the way to use text or digital code. The symbolic connection cannot be changed, if you modify the permissions on the symbol file , - its permissions will function in the original file being connected.  to  + the representation of a permission range is as follows: - u user, which is the owner of the file or directory; the G Group, which is the group belonging to the file or directory; * o Other, except for the owner or group of files or directories, other users belong to this scope; $ a all, that is, all users, including the owner, the group and other users;Panax Notoginseng R Read permission, the number code is "4" - W Write permission, the number code is "2" the x Execute or switch permissions, the number code is "1" + -does not have any permissions, the number code is "0" A s Special function Description, change the permissions of the file or directory.  the Grammar + chmod (option) (parameter) - Options $ The- C effect is similar to the-v parameter, but returns only the part of the change; $ - F does not display error messages - - R recursive processing - -V shows the execution of the instruction the Parameters - Permission mode: Specifies the permission mode of the fileWuyi file: The file to change permissions for.  the knowledge expansion and examples - Linux users are divided into: owners, groups, other (other), Linux systems, presets, all accounts in the system and general identity users, and root information, Wu are recorded in the/etc/passwd file. Each person's password is recorded under the/etc/shadow file. In addition, all group names are recorded in/etc/group!  - Example About chmod u+x,g+w f01//For file F01 set itself can be executed, the members can write permissions $ chmod u=rwx,g=rw,o=r f01 - chmod 764 F01 - chmod a+x f01//u,g,o for file F01 set execution Properties - owner and Owner group property settings for the file A chown user:marker f01//File F01 to user, add to market group +Ll-d F1//View the properties of the directory F1

Linux File Permissions property settings

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.