ºÝºÝߣ

ºÝºÝߣShare a Scribd company logo
H?c Ph?n: Chuy¨ºn ?? H? ?i?u H¨¤nh
1
PH?N QUY?N TRUY C?P T?I NGUY?N
Ubuntu t?o ra m?i tr??ng nhi?u ng??i d¨´ng chung t¨¤i nguy¨ºn. Ch¨ªnh v¨¬ v?y vi?c b?o
m?t c¨¢c t¨¤i nguy¨ºn n¨¤y r?t quan tr?ng.
Ubuntu l¨¤ h? ?i?u h¨¤nh m? d?a tr¨ºn Linux. Ubuntu t?o ra m?i tr??ng nhi?u ng??i
d¨´ng chung t¨¤i nguy¨ºn. Ch¨ªnh v¨¬ v?y vi?c b?o m?t c¨¢c t¨¤i nguy¨ºn n¨¤y r?t quan
tr?ng. Ng??i qu?n tr? c?n ph?i thi?t l?p quy?n h?n cho t?p tin, th? m?c sao cho kh?ng
b? thay ??i n?i dung, kh?ng b? x¨®a. ?? n?m r? v?n ?? n¨¤y, b?n c?n t¨¬m hi?u quy?n
h?n c?a ng??i d¨´ng tr¨ºn FileSystem.
??y c?ng l¨¤ m?t trong s? nh?ng l? do ng??i s? d?ng ?¨¢nh gi¨¢ r?t cao kh? n?ng b?o
m?t, an to¨¤n. Ngo¨¤i ra vi?c ph?n quy?n t?t s? tr¨¢nh vi?c h? th?ng file system c?a
Ubuntu b? ph¨¢ h?ng nh? ?¨® h? th?ng v?n h¨¤nh m?t c¨¢ch ?n ??nh h?n.
2
M?i ng??i d¨´ng tr¨ºn Ubuntu ???c c?p m?t th? m?c ri¨ºng (g?i l¨¤ home
directory), th?c ch?t l¨¤ m?t th? m?c con c?a /home. C¨® d?ng l¨¤: /home/username
M?i ng??i d¨´ng ch? c¨® quy?n thao t¨¢c trong th? m?c ri¨ºng c?a m¨¬nh (v¨¤ nh?ng th?
m?c kh¨¢c ???c ph¨¦p c?a h? th?ng) m¨¤ th?i.
Th??ng th¨¬ t?p tin v¨¤ th? m?c ???c t?o b?i ng??i d¨´ng n¨¤o th¨¬ s? thu?c v? ng??i d¨´ng
?¨®.
HOME DIRECTORY
3
PH?N QUY?N TR?N T?P TIN/TH? M?C
C?p quy?n h?n cho t?p tin/th? m?c. Ch? c¨® ch? s? h?u v¨¤ root m?i c¨® quy?n th?c hi?n!
Linux cho ph¨¦p ng??i d¨´ng x¨¢c ??nh c¨¢c quy?n ??c (r), ghi (w) v¨¤ th?c thi (e) cho t?ng
??i t??ng. C¨® ba lo?i ??i t??ng :
1. Ng??i s? h?u (owner) : 3 k? t? ??u ti¨ºn
2. Nh¨®m s? h?u (group) : 3 k? t? ti?p theo
3. Ng??i kh¨¢c (others) : 3 k? t? cu?i c¨´ng
Foder
File
4
L?NH CHMOD ¨C K? HI?U ??C TR?NG
L?nh chmod cho ph¨¦p x¨¢c l?p quy?n tr¨ºn t?ng t?p tin, th? m?c..
C?p Quy?n cho t?ng t?p tin/th? m?c:
chmod [Nh¨®m ng??i d¨´ng] [thao t¨¢c] [Quy?n ] [t?p tin/th? m?c]
[Nh¨®m ng??i d¨´ng] : u l¨¤ user ; g l¨¤ group ; o l¨¤ others ; a l¨¤ all.
[thao t¨¢c]: + l¨¤ th¨ºm quy?n ; - l¨¤ x¨®a quy?n ; = l¨¤ g¨¢n quy?n b?ng
[Quy?n ]: r l¨¤ read ; w l¨¤ write ; x l¨¤ execute
[t?p tin/th? m?c]: t?p tin/ th? m?c s? ???c ph?n quy?n
Ngo¨¤i ra ?? thu?n ti?n cho vi?c ph?n quy?n th¨¬ c¨°n c¨® l?nh c?p quy?n cho th? m?c, c? c¨¢c th?
m?c con n?m trong th? m?c cha:
Chmod -R [Nh¨®m ng??i d¨´ng] [thao t¨¢c] [Quy?n ] [th? m?c]
5
L?NH CHMOD ¨C K? HI?U ??C TR?NG
V¨ª D?: V?i Th? M?c
Th?c hi?n l?nh tr¨ºn terminal: chmod u+rwx,g+r,o+w TNK34
1. Ng??i s? h?u (owner) : ???c quy?n ??C - VI?T - TH?C THI
2. Nh¨®m s? h?u (group) : ???c quy?n ??C
3. Ng??i kh¨¢c (others) : ???c quy?n VI?T
Foder
6
L?NH CHMOD - TH?NG S? TUY?T ??I
?? x¨¢c ??nh quy?n h?n t?p tin/th? m?c, ta s? d?ng c¨¢c con s?:
4 = Read (quy?n ???c ??c)
2 = Write (quy?n ???c ghi)
1 = Execute (quy?n ???c th?c hi?n)
T¨®m l?i c¨® t?t c? 8 ph??ng ¨¢n sau:
7 = Read, Write & Execute
6 = Read & Write
5 = Read & Execute
4 = Read
3 = Write & Execute
2 = Write
1 = Execute
0 = None
7
L?NH CHMOD - TH?NG S? TUY?T ??I
V¨ª D?: V?i T?p Tin
Th?c hi?n l?nh tr¨ºn terminal: chmod 644 TNK34
Gi?i Th¨ªch: 1).C?p quy?n cho owner: 6 = 4 + 2 (r =4, w=2)
2).C?p quy?n cho group: 4 (r=4)
3).C?p quy?n cho other: 4 (r=4)
1. Ng??i s? h?u (owner) : ???c quy?n ??C - VI?T
2. Nh¨®m s? h?u (group) : ???c quy?n ??C
3. Ng??i kh¨¢c (others) : ???c quy?n ??C
File
8
CH? S? H?U T?P TIN/TH? M?C
Ch? s? h?u/nh¨®m s? h?u cho t?p tin/th? m?c.
1. Ch? s? h?u t?p tin/th? m?c
2. Nh¨®m s? h?u t?p tin/th? m?c
Foder
File
9
L?NH CHOWN/CHGRP
Thay ??i ch? s? h?u cho t?p tin/th? m?c.
1. chown [Ch? s? h?u] [t?p tin/th? m?c]
Thay ??i nh¨®m s? h?u cho t?p tin/th? m?c
2. chgrp [Nh¨®m s? h?u] [t?p tin/th? m?c]
Foder
File
10
L?NH CHOWN/CHGRP
Th?c hi?n l?nh tr¨ºn terminal:
1).Thay ??i ch? s? h?u: chown nhat TNK34
2).Thay ??i nh¨®m s? h?u: chgrp GiangVien TNK34
Foder
1. Ch? s? h?u m?i c?a th? m?c TNK34 : [user] nhat
2. Nh¨®m s? h?u m?i c?a th? m?c TNK34: [group] GiangVien
Foder
V¨ª D?: Thay ??i ch? s? h?u th? m?c
11
TNK34
Ng??i s? h?u:
root
Nh¨®m s? h?u:
root
Ng??i kh¨¢c:
B?t k?
Read-Write-Execute Read-Execute Read-Execute
GiangVien
N_SH:
hai
NH_SH
GiangVien
NK
B?t k?
r-w-x r-w-x ---
SinhVien
N_SH:
tien
NH_SH
SinhVien
NK
B?t k?
r-w-x r-w-x r--
DungChung
N_SH:
huy
NH_SH
root
NK
B?t k?
r-w-x r-w-x r-w-x
Nh¨®m : GiangVien
+ user hai:
Th?y D??ng V?n H?i
+ user : huy
Th?y Ph?m Quang Huy
Nh¨®m : SinhVien
+ user kien:
L??ng V?n Ki¨ºn
+ user : nhat
Nguy?n Nh?t
+ user quan:
L¨º H? Y?n Qu?n
+ user : tien
Nguy?n Ph??c Ti?n
PH?N QUY?N S? D?NG T?I NGYU?N TNK34
12
13
DungChung
N_SH:
huy
NH_SH
root
NK
B?t k?
r-w-x r-w-x r-w-x
A
N_SH:
a
NH_SH
Khach
NK
B?t k?
r-w-x r-w-x r-w-x
B
N_SH:
b
NH_SH
Khach
NK
B?t k?
r-w-x r-w-x r-x
C
N_SH:
c
NH_SH
Khach
NK
B?t k?
r-w-x r-x ---
Nh¨®m : Khach
+ user : a
User A
+ user : b
User B
+ user : c
User C
C¨¢c user kh¨¢c
+ user : d
User D
+ user : e
User E
+ user : f
User F
PH?N QUY?N S? D?NG T?I NGYU?N TNK34
L¨¤m r? Y¨ºu c?u ??t ra v? ph?n quy?n tr¨ºn t¨¤i nguy¨ºn TNK34
+ Ph?n quy?n tr¨ºn t¨¤i nguy¨ºn TNK34 root l¨¤ ng??i qu?n tr? vi¨ºn cao nh?t - c¨® m?i quy?n h?n,
ng??i kh¨¢c ch? ???c ph¨¦p ??c v¨¤ th?c thi tr¨ºn TNK34
+ T¨¤i li?u ng??i n¨¤o t?o ra ng??i ?¨® s? h?u, nh¨®m ?¨® ???c s? h?u, ng??i kh¨¢c kh?ng th? x?m
ph?m.
+ T¨¤i li?u c?a Gi?ng Vi¨ºn t?o ra th¨¬ ko ai ???c ph¨¦p truy c?p tr? th¨¤nh vi¨ºn c?a GiangVien.
+ T¨¤i li?u c?a Sinh Vi¨ºn t?o ra th¨¤nh vi¨ºn c?a nh¨®m SinhVien ???c quy?n ??c-vi?t-th?c thi, kh¨¢ch
v?ng lai ch? ???c ph¨¦p ??c.
+ DungChung ?? t?t c? m?i ng??i chia s? t¨¤i li?u, nh?ng t¨¤i li?u ai t?o ra ng??i ?¨® s? h?u, nh¨®m
?¨® s? h?u.(k? c? kh¨¢ch v?ng lai)
+ ¡­C¨¢c b?n ??t c?u h?i, nh¨®m tr? l?i!
PH?N QUY?N S? D?NG T?I NGYU?N TNK34
14
The end
15

More Related Content

Ph?n quy?n tr¨ºn file v¨¤ th? m?c tr¨ºn Ubuntu

  • 1. H?c Ph?n: Chuy¨ºn ?? H? ?i?u H¨¤nh 1
  • 2. PH?N QUY?N TRUY C?P T?I NGUY?N Ubuntu t?o ra m?i tr??ng nhi?u ng??i d¨´ng chung t¨¤i nguy¨ºn. Ch¨ªnh v¨¬ v?y vi?c b?o m?t c¨¢c t¨¤i nguy¨ºn n¨¤y r?t quan tr?ng. Ubuntu l¨¤ h? ?i?u h¨¤nh m? d?a tr¨ºn Linux. Ubuntu t?o ra m?i tr??ng nhi?u ng??i d¨´ng chung t¨¤i nguy¨ºn. Ch¨ªnh v¨¬ v?y vi?c b?o m?t c¨¢c t¨¤i nguy¨ºn n¨¤y r?t quan tr?ng. Ng??i qu?n tr? c?n ph?i thi?t l?p quy?n h?n cho t?p tin, th? m?c sao cho kh?ng b? thay ??i n?i dung, kh?ng b? x¨®a. ?? n?m r? v?n ?? n¨¤y, b?n c?n t¨¬m hi?u quy?n h?n c?a ng??i d¨´ng tr¨ºn FileSystem. ??y c?ng l¨¤ m?t trong s? nh?ng l? do ng??i s? d?ng ?¨¢nh gi¨¢ r?t cao kh? n?ng b?o m?t, an to¨¤n. Ngo¨¤i ra vi?c ph?n quy?n t?t s? tr¨¢nh vi?c h? th?ng file system c?a Ubuntu b? ph¨¢ h?ng nh? ?¨® h? th?ng v?n h¨¤nh m?t c¨¢ch ?n ??nh h?n. 2
  • 3. M?i ng??i d¨´ng tr¨ºn Ubuntu ???c c?p m?t th? m?c ri¨ºng (g?i l¨¤ home directory), th?c ch?t l¨¤ m?t th? m?c con c?a /home. C¨® d?ng l¨¤: /home/username M?i ng??i d¨´ng ch? c¨® quy?n thao t¨¢c trong th? m?c ri¨ºng c?a m¨¬nh (v¨¤ nh?ng th? m?c kh¨¢c ???c ph¨¦p c?a h? th?ng) m¨¤ th?i. Th??ng th¨¬ t?p tin v¨¤ th? m?c ???c t?o b?i ng??i d¨´ng n¨¤o th¨¬ s? thu?c v? ng??i d¨´ng ?¨®. HOME DIRECTORY 3
  • 4. PH?N QUY?N TR?N T?P TIN/TH? M?C C?p quy?n h?n cho t?p tin/th? m?c. Ch? c¨® ch? s? h?u v¨¤ root m?i c¨® quy?n th?c hi?n! Linux cho ph¨¦p ng??i d¨´ng x¨¢c ??nh c¨¢c quy?n ??c (r), ghi (w) v¨¤ th?c thi (e) cho t?ng ??i t??ng. C¨® ba lo?i ??i t??ng : 1. Ng??i s? h?u (owner) : 3 k? t? ??u ti¨ºn 2. Nh¨®m s? h?u (group) : 3 k? t? ti?p theo 3. Ng??i kh¨¢c (others) : 3 k? t? cu?i c¨´ng Foder File 4
  • 5. L?NH CHMOD ¨C K? HI?U ??C TR?NG L?nh chmod cho ph¨¦p x¨¢c l?p quy?n tr¨ºn t?ng t?p tin, th? m?c.. C?p Quy?n cho t?ng t?p tin/th? m?c: chmod [Nh¨®m ng??i d¨´ng] [thao t¨¢c] [Quy?n ] [t?p tin/th? m?c] [Nh¨®m ng??i d¨´ng] : u l¨¤ user ; g l¨¤ group ; o l¨¤ others ; a l¨¤ all. [thao t¨¢c]: + l¨¤ th¨ºm quy?n ; - l¨¤ x¨®a quy?n ; = l¨¤ g¨¢n quy?n b?ng [Quy?n ]: r l¨¤ read ; w l¨¤ write ; x l¨¤ execute [t?p tin/th? m?c]: t?p tin/ th? m?c s? ???c ph?n quy?n Ngo¨¤i ra ?? thu?n ti?n cho vi?c ph?n quy?n th¨¬ c¨°n c¨® l?nh c?p quy?n cho th? m?c, c? c¨¢c th? m?c con n?m trong th? m?c cha: Chmod -R [Nh¨®m ng??i d¨´ng] [thao t¨¢c] [Quy?n ] [th? m?c] 5
  • 6. L?NH CHMOD ¨C K? HI?U ??C TR?NG V¨ª D?: V?i Th? M?c Th?c hi?n l?nh tr¨ºn terminal: chmod u+rwx,g+r,o+w TNK34 1. Ng??i s? h?u (owner) : ???c quy?n ??C - VI?T - TH?C THI 2. Nh¨®m s? h?u (group) : ???c quy?n ??C 3. Ng??i kh¨¢c (others) : ???c quy?n VI?T Foder 6
  • 7. L?NH CHMOD - TH?NG S? TUY?T ??I ?? x¨¢c ??nh quy?n h?n t?p tin/th? m?c, ta s? d?ng c¨¢c con s?: 4 = Read (quy?n ???c ??c) 2 = Write (quy?n ???c ghi) 1 = Execute (quy?n ???c th?c hi?n) T¨®m l?i c¨® t?t c? 8 ph??ng ¨¢n sau: 7 = Read, Write & Execute 6 = Read & Write 5 = Read & Execute 4 = Read 3 = Write & Execute 2 = Write 1 = Execute 0 = None 7
  • 8. L?NH CHMOD - TH?NG S? TUY?T ??I V¨ª D?: V?i T?p Tin Th?c hi?n l?nh tr¨ºn terminal: chmod 644 TNK34 Gi?i Th¨ªch: 1).C?p quy?n cho owner: 6 = 4 + 2 (r =4, w=2) 2).C?p quy?n cho group: 4 (r=4) 3).C?p quy?n cho other: 4 (r=4) 1. Ng??i s? h?u (owner) : ???c quy?n ??C - VI?T 2. Nh¨®m s? h?u (group) : ???c quy?n ??C 3. Ng??i kh¨¢c (others) : ???c quy?n ??C File 8
  • 9. CH? S? H?U T?P TIN/TH? M?C Ch? s? h?u/nh¨®m s? h?u cho t?p tin/th? m?c. 1. Ch? s? h?u t?p tin/th? m?c 2. Nh¨®m s? h?u t?p tin/th? m?c Foder File 9
  • 10. L?NH CHOWN/CHGRP Thay ??i ch? s? h?u cho t?p tin/th? m?c. 1. chown [Ch? s? h?u] [t?p tin/th? m?c] Thay ??i nh¨®m s? h?u cho t?p tin/th? m?c 2. chgrp [Nh¨®m s? h?u] [t?p tin/th? m?c] Foder File 10
  • 11. L?NH CHOWN/CHGRP Th?c hi?n l?nh tr¨ºn terminal: 1).Thay ??i ch? s? h?u: chown nhat TNK34 2).Thay ??i nh¨®m s? h?u: chgrp GiangVien TNK34 Foder 1. Ch? s? h?u m?i c?a th? m?c TNK34 : [user] nhat 2. Nh¨®m s? h?u m?i c?a th? m?c TNK34: [group] GiangVien Foder V¨ª D?: Thay ??i ch? s? h?u th? m?c 11
  • 12. TNK34 Ng??i s? h?u: root Nh¨®m s? h?u: root Ng??i kh¨¢c: B?t k? Read-Write-Execute Read-Execute Read-Execute GiangVien N_SH: hai NH_SH GiangVien NK B?t k? r-w-x r-w-x --- SinhVien N_SH: tien NH_SH SinhVien NK B?t k? r-w-x r-w-x r-- DungChung N_SH: huy NH_SH root NK B?t k? r-w-x r-w-x r-w-x Nh¨®m : GiangVien + user hai: Th?y D??ng V?n H?i + user : huy Th?y Ph?m Quang Huy Nh¨®m : SinhVien + user kien: L??ng V?n Ki¨ºn + user : nhat Nguy?n Nh?t + user quan: L¨º H? Y?n Qu?n + user : tien Nguy?n Ph??c Ti?n PH?N QUY?N S? D?NG T?I NGYU?N TNK34 12
  • 13. 13 DungChung N_SH: huy NH_SH root NK B?t k? r-w-x r-w-x r-w-x A N_SH: a NH_SH Khach NK B?t k? r-w-x r-w-x r-w-x B N_SH: b NH_SH Khach NK B?t k? r-w-x r-w-x r-x C N_SH: c NH_SH Khach NK B?t k? r-w-x r-x --- Nh¨®m : Khach + user : a User A + user : b User B + user : c User C C¨¢c user kh¨¢c + user : d User D + user : e User E + user : f User F PH?N QUY?N S? D?NG T?I NGYU?N TNK34
  • 14. L¨¤m r? Y¨ºu c?u ??t ra v? ph?n quy?n tr¨ºn t¨¤i nguy¨ºn TNK34 + Ph?n quy?n tr¨ºn t¨¤i nguy¨ºn TNK34 root l¨¤ ng??i qu?n tr? vi¨ºn cao nh?t - c¨® m?i quy?n h?n, ng??i kh¨¢c ch? ???c ph¨¦p ??c v¨¤ th?c thi tr¨ºn TNK34 + T¨¤i li?u ng??i n¨¤o t?o ra ng??i ?¨® s? h?u, nh¨®m ?¨® ???c s? h?u, ng??i kh¨¢c kh?ng th? x?m ph?m. + T¨¤i li?u c?a Gi?ng Vi¨ºn t?o ra th¨¬ ko ai ???c ph¨¦p truy c?p tr? th¨¤nh vi¨ºn c?a GiangVien. + T¨¤i li?u c?a Sinh Vi¨ºn t?o ra th¨¤nh vi¨ºn c?a nh¨®m SinhVien ???c quy?n ??c-vi?t-th?c thi, kh¨¢ch v?ng lai ch? ???c ph¨¦p ??c. + DungChung ?? t?t c? m?i ng??i chia s? t¨¤i li?u, nh?ng t¨¤i li?u ai t?o ra ng??i ?¨® s? h?u, nh¨®m ?¨® s? h?u.(k? c? kh¨¢ch v?ng lai) + ¡­C¨¢c b?n ??t c?u h?i, nh¨®m tr? l?i! PH?N QUY?N S? D?NG T?I NGYU?N TNK34 14