Linux file attributes What?

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_32067151/article/details/102698434

 -rw-r - r-- permission symbol that is a total yes - --- --- --- These bits.

  A short horizontal type identifier of the file: - indicates common file; C represents a character device (character); b represents a block device (block); d represents a directory (directory); l represents a linked file (Link); after the first a dash three consecutive bits are user rights (user), the second set of three consecutive dashes are permission bits (group), the third three consecutive dashes other permission bits (other). Each authority has three permission bits, r (read permission), w (write access), x (execute permissions). If each permission bits have permission to exist, then the situation is full of privileges: -rwxrwxrwx; permission is empty case is - --- --- ---.

  Setting authority can use the chmod command, bit format: chmod ugoa + / - / = rwx filename / directory. E.g:

  Aaa have a file completely empty Access - --- --- ---.

  chmod u + rw aaa (user permission bit set access rights, permissions expressed as: - rw- --- ---)

  chmod g + r aaa (readable to set permissions, permissions expressed as: - --- r-- ---)

  chmod ugo + rw aaa (to users, groups, set permissions or other user to read and write permissions expressed as: - rw- rw- rw-)

  If the aaa has full authority - rwx rwx rwx.

  chmod ux aaa (to remove the user can perform the right, it is expressed as: - rw- rwx rwx)

  If you give aaa given the development rights - rwx rx rx, the command is:

  chmod u=rwx,go=rx aaa

Guess you like

Origin blog.csdn.net/qq_32067151/article/details/102698434