linux-- file permissions management

File information is displayed:


 

Folder permissions:

  • w: no write permissions to create, delete files
  • r: no read permission to list the file list, if you know the file name, you can directly access files
  • x: no execute permission to switch to the folder, you can not access the file folder can not be added to modify the file. If you have read access, you can list the file list.

 

File permissions management tools:

  • modify the file owner chown
  • chgrp to modify the file belongs to group
  • chmod permission to modify specific files
    • Mode method chmod who opt per file. Example: chmod ow f1.txt minus write access to other users
      • who: u (rights owner), g (owning group permissions), o (others permission), a (so it was), without a default
      • opt: + (increase assign permissions), - (minus assign permissions), = (equal to the specified permission)
      • per: r (read), w (write), x (execute), X-(Execute permission only to a folder, with the option to use -R)
      • file: the file name
      Digital method:. Chmod authority digital file example chmod 764 f1.txt set u = rwx g = rx o = r
      • r=4,w=2,x=1

chown: modify the file owner, chown username file

chgrp: modify the file group, chgrp group file name

chmod: modify file permissions

Copy the file permissions: - reference

 

Guess you like

Origin www.cnblogs.com/franc/p/12503654.html