Attributes of Folders

When you call a list of folders by command ls -l, then the attributes of folders are performed in order: directory (or folder), rights r, w, x for owner, group and other, owner name and group name. For example:

-rwxr--r-- 1 hai hai 2144Mar 29 21:44 test.htm

drwxr-xr-x 3 hai hai 4096Mar 29 21:55 xdir

Change the attributes:

Thay đổi thuộc tính

  1. Change owner:
    • chown <username> <filename>
    • chgrp <groupname> <filename>
  2. Setup rights to access folder:

After creating folder, you use command umask <number> to setup rights to access the folder for u: user; g: group o: other) with the group of numbers in umask below:

BineryRights
0Read and Write (and Excutive for Dir)
1Read and Write
2Read (and Excutive for Dir)
3Read
4Write (and Excutive for Dir)
5Write
6Excutive for Dir
7No rights

 

There are two ways of changing rights for folder:

  • chmod [u|g|o] [+|-] [r|w|x] filename
  • Absolutely setup: chmod <number> filename

 

 

@2011 Viện Vật lý
Số 10 Đào Tấn, Thủ lệ, Ba Đình, Hà Nội

Fax (84-4) 3766 9050; Website: http://www.iop.vast.ac.vn