I. Introduction:
Linux system is a typical multi-user systems, different users have different status, with different privileges. To protect the security of the system, Linux system access the same file (including directory files) for different users to do different provisions.
Users and groups can be used in Linux we ll or ls -l command to display the attributes of a file and the file belongs
Attribute of each file is determined by the character of the first portion 10 to the left (as shown below: from novice Tutorial)
Second, the owner and group file operations
[root@www /]# ls -l total 64 drwxr-xr-x 2 root root 4096 Feb 15 14:46 cron drwxr-xr-x 3 mysql mysql 4096 Apr 21 2014 mysql ...... owner is a group
1, change file attributes
# Change the file owner group chgrp [- R] is a group of the filename # Change or change file owner with chown [-R] owner name of the file name chown [ - R & lt] owner name: name of the file name is a group
Linux file attributes There are two settings, one is digital, one is a symbol
- Digital (rwx: 4 2 1)
# Chmod: change file attributes nine chmod [-R] xyz file or directory
- symbol u, g, o rights to represent three identities, in addition, A represents All , i.e. the identity of all
+ (Increase) - (removed), = (setting)
# Touch // create test1 test1 file # LS -al // test1 test1 view the default permissions -rw-r - r-- 1 root root 0 Nov 15 10:32 test1 # chmod = rwx U, G = rx, O = r test1 // modify permission test1 # LS -Al test1 -rwxr the root-XR, the root. 1 0 15-Nov 10:32 test1