Advertisement
Drthrax74

[1] FSTAB (Tutorial)

May 2nd, 2016
340
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##################################
  2. # Etape 1: Explications (chmod )    #
  3. ##################################
  4.  
  5.  
  6. Explication:
  7. - / d       : Fichier / répertoire (1er caractère)
  8. r / w / x / l   : Lecture / Ecriture / Execution / liens symbolique
  9. Lettre      : 1
  10. Tiret           : 0
  11.  
  12. ls -l
  13.  
  14. Syntaxe : <Type>        <USER> <Group>  <Autre> <....>
  15. Exemple:    d         rwx     rwx    rwx    1 drthrax drthrax 4096 avril 15 11:56 Jeux
  16.                       111     111    111        <= Binaire
  17.                         7       7      7    <= Décimale (Chmod)
  18.                
  19.  
  20. #Conversion
  21. Décimale       Binaire  
  22. 0           000
  23. 1           001
  24. 2           010
  25. 3           011
  26. 4           100
  27. 5           101
  28. 6           110
  29. 7           111
  30.  
  31. Binaire : 111-111-111
  32. Décimale: 7-7-7 (chmod 777)
  33.  
  34.  
  35. ##########
  36. # Umask #
  37. ##########
  38.  
  39. $ umask
  40.          022        <= Mode root
  41.         0002        <= Mode User
  42. <Valeur Binaire> - <Valeur umask>
  43.  
  44.     <111     111 111>   <= 777
  45. -   <000 010 010>   <= Umask root    
  46. -----------------------------------
  47.     <111 101 101>   <= root
  48.        7   5  5     <= root
  49.  
  50.  
  51.  
  52.     <111     111 110>   <= 777
  53. -   <000 000 010>   <= Umask utilisateur
  54. ------------------------------
  55.     <111 111 101>
  56.      rwx rwx r-x
  57.  
  58.  
  59.  
  60.  
  61.  
  62. ##########
  63. # FSTAB #
  64. ##########
  65.  
  66. user/nouser     => [Autoriser/ Refuser] Montage & Démontage de Disque
  67. exec/noexec     => [Autoriser / Refuser]  Executions de programme
  68. auto/noauto     => [Automatique/Manuel] Montage au démarrage
  69. ro/rw           => Lecture Uniquement / Lecture-Ecriture
  70. uid=                => User_ID      cat /etc/passwd | grep $USER    (Attention ne pas être en root)
  71. gid=                => Group_ID     cat /etc/group   | grep $USER   (Attention ne pas être en root)
  72. umask=          => Autorisation (taper umask en user pour obtenir son umask)
  73. iocharset=      =>
  74. blksize=            => Taille de bloque du disque dur (sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL)
  75. x-gvfs-show     => Afficher dans l'interface le disque
  76.  
  77.  
  78.  
  79. x-gvfs-show,user,exec,auto,rw,uid=1000,gid=1000,umask=022
  80.  
  81.  
  82. http://www.generation-linux.fr/index.php?post/2009/02/04/Cours-Linux-%3A-Les-permissions
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement