파일 및 경로 권한 부여 방법
사용 환경에서 필요한 내용만 정리.
시스템 환경
OS : CentOS 7 3.10.0-957.el7.x86_64
사용 방법
Change the mode of each FILE to MODE.
주의 할 점으로 chmod 의 경우 현재 상태의 권한을 변경.
- Permission Change
- 주로 사용 하는 예시
 
 
[wasadm@localhost sw]$ chmod -R 700 ./was
[wasadm@localhost sw]$ chmod -R 700 ./web
[wasadm@localhost sw]$ chmod -R 755 ./bin
[wasadm@localhost sw]$ chmod -R 777 ./img
하위 디렉토리 속성 까지 변경
-R, --recursive change files and directories recursively
Options
There are two ways to modify permissions, with numbers or with letters.
- 문자열 모드
 
| Parameters | |
|---|---|
| u | User (the owner of the file) 소유자 | 
| g | group (any member of the file's defined group) 그룹 | 
| o | Other (anyone else) 기타 사용자 | 
| a | All (equivalent to ugo) ugo 전체 사용자 | 
| + | add permission | 
| - | remove permission | 
| = | set permission | 
- 숫자 모드 (많이 사용하는 모드)
 
| Parameters | symbol | Permission | 
|---|---|---|
| 1 | --- | No Permission | 
| 2 | --x | Execute | 
| 3 | -w- | Write | 
| 4 | -wx | Write and Execute | 
| 5 | r-- | Read | 
| 6 | rw- | Read and Exceute | 
| 7 | rwx | all | 
0 Comments:
댓글 쓰기