Thứ Sáu, 3 tháng 6, 2011

Permission

_ Ownership: user/group/other (u/g/o)
_ Permission: read/write/execute (r/w/x)


FILEFOLDER
R (4)xem noi dung file: cat, more, less, head, tail, nano, vi...xem noi dung thu muc: ls, dir
W (2)thay doi noi dung file: cat, nano, vi, echo...thay doi noi dung thu muc
X (1)file thuc thitruy cap vao thu muc: cd

_ Ownership and permission: rwxr-xr-x : 755

_ Xem ownership and permission:
#ls -l /etc/passwd
-> -rw-r--r--        1              root     root     1822       Apr 8 2008      /etc/passwd
                                644        so hardlink        user    group    size        date                file
firstbit: file type: - : file, d: directory, l: symbolic link

_ Doi user so huu:
#cp /etc/passwd /root
#chown apache /root/passwd
            user    file

_ Doi group so huu:
#chgrp ftp /root/passwd
#chown .ftp /root/passwd

_ Doi user, group dong thoi:
#chown root.root /root/passwd

_ Change permission:
#chmod 664 /root/passwd

_ Important folders:

/binchua file thuc thi cua he thong
/bootchua cac file boot
/devchua file thiet bi, driver
/etcchua file cau hinh
/homethu muc home cua user
/libthu vien cua he thong
/media, /mntvi tri mount cua cac thiet bi gan ngoai
/optdanh cho pm hang thu ba
/procchua thongtin hethong
/roothome directory cua user root
/sbinsystem binary, su dung trong mode restore
/tmptemp, he thong luu file tam vao day
/usrpm cai tu source code
/varluu tru data, cache, query, noi data thay doi lien tuc

_ Cau truc he thong:

USER
SHELL
KERNEL
HARDWARE

_ Xem ten SHELL:
$echo $SHELL (bien moi truong)

_ Xem tat ca bien moi truong:
$env ok $printenv

_ Tao bien moi truong:
$export CHAO="hello" (ten bien = gia tri)

_ Xoa bien moi truong:
$unset CHAO

0 nhận xét:

Đăng nhận xét

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by netdohoa | Support for this Theme dohoavietnam