Axil S/E-ljs078
                                1994.1.4
                               Lee Jin-Soo


SUBJECT:   Umask Test







 ★ UMASK TEST ★
    - 기본적으로 화일은 666 이고 디렉토리는 777값으로 설정하여 계산이 된다

 o  # umask 0  ( umask 00 와 umask 000 결과 동일) 
    # touch 00  # mkdir 000
    # ls -alg
    -rw-rw-rw-  1 ljs      sunse           0 Jan 19 14:01 00
    drwxrwxrwx  2 ljs      sunse         512 Jan 19 14:01 000/
 o  # umask 1
    # touch 1   # mkdir 11
    # ls -alg
    -rw-rw-rw-  1 ljs      sunse           0 Jan 19 13:58 1
    drwxrwxrw-  2 ljs      sunse         512 Jan 19 13:58 11/
 o  # umask 11
    # touch 11  # mkdir 111
    # ls -alg
    -rw-rw-rw-  1 ljs      sunse           0 Jan 19 14:02 11
    drwxrw-rw-  2 ljs      sunse         512 Jan 19 14:02 111/
 o  # umask 111
    # touch 111  # mkdir 1111
    # ls -alg
    -rw-rw-rw-  1 ljs      sunse           0 Jan 19 14:06 111
    drw-rw-rw-  2 ljs      sunse         512 Jan 19 14:06 1111/
 o  # umask 2
    # touch 2    # mkdir 22
    # ls -alg
    -rw-rw-r--  1 ljs      sunse           0 Jan 19 14:09 2
    drwxrwxr-x  2 ljs      sunse         512 Jan 19 14:09 22/
 o  # umask 22
    # touch 22   # mkdir 222
    # ls -alg
    -rw-r--r--  1 ljs      sunse           0 Jan 19 14:11 22
    drwxr-xr-x  2 ljs      sunse         512 Jan 19 14:11 222/
 o  # umask 222
    # touch 222  # mkdir 2222
    # ls -alg
    -r--r--r--  1 ljs      sunse           0 Jan 19 14:14 222
    dr-xr-xr-x  2 ljs      sunse         512 Jan 19 14:14 2222/
 o  # umask 4
    w touch 4    # mkdir 44
    w ls -alg
    -rw-rw--w-  1 ljs      sunse           0 Jan 19 14:15 4
    drwxrwx-wx  2 ljs      sunse         512 Jan 19 14:15 44/
 o  # umask 44
    # touch 44   # mkdir 444
    # ls -alg
    -rw--w--w-  1 ljs      sunse           0 Jan 19 14:20 44
    drwx-wx-wx  2 ljs      sunse         512 Jan 19 14:20 444 
 o  # umask 444
    # touch 444  # mkdir 4444
    # ls -alg
    --w--w--w-  1 ljs      sunse           0 Jan 19 14:22 444
    d-wx-wx-wx  2 ljs      sunse         512 Jan 19 14:22 4444/
 o  # umask 024
    # touch ljs  # mkdir ljs1
    # ls -alg
    -rw-r---w-  1 ljs      sunse           0 Jan 19 14:22 ljs
    drwxr-x-wx  2 ljs      sunse         512 Jan 19 14:22 ljs1/
 
   ★ 결론 ★ 
      .  화일인경우  666 - umask = value로 mode가 설정됨 
      .  디렉토리인경우 777에서 umask값만 뺀다.