Linux rights management (7)

Basic introduction permissions:

  

Detailed rwx permissions:

  rwx applied to the file:

    [R]: Representative read, read, see

    [W]: representative may write, can be modified, but it does not mean you can delete the file, delete a file on the premise that you have write access to the directory where the file can delete the file

    [X]: represents the executable

  rwx role in the directory:

    [R]: Representative read, read, view contents of LS

    [W]: representatives can write, you can modify, create a directory within the directory renaming + Remove +

    [X]: represents the executable, you can enter the directory

 

Modify permission -chmod: You can modify the permissions of a file or directory

  The first way: + - = change the permissions

    u: Owner g: all groups o: Other Group a: all (u, g, o sum)

    chmod u = rwx, g = rx, o = x filename

    chmod o + w filename

    chmod ax file name

    

  The second way: by changing the digital rights

    r=4,w=2,x=1,rwx=7

    chmod 751 filename

Modify the file owner

  chmod [-R] newowner file: change the owner of the file

  chmod [-R] newowner: newgroup file: change the file owner's group and

  If -R is a directory, so that all sub-files or directories recursively into force

Modify the file's group

  chgrd [-R] newgroup file: change the file's group

Guess you like

Origin www.cnblogs.com/az4215/p/11403935.html