뭉게뭉게 엔지니어
Ownership 본문
Ownership 이란?
- 소유권이라 해석되는 것으로, 개체에 대한 소유자와 소유그룹을 말한다.
- linux 시스템의 모든 개체(파일 및 디렉터리)는 소유자와 소속그룹이 지정되어 있다.
- 파일 생성 시 파일을 생성한 계정이 파일의 소유자가 된다.
- 파일 생성 시 파일을 생성한 계정의 기본 그룹이 파일의 소유 그룹이 된다.
- 명령어를 이용해 소유자와 소유그룹을 변경할 수 있다.
ls -l 명령어를 입력했을 때 나오는 정보 중
해당 파일을 생성한 계정이 owner(u), 1차 group(g) 이 소유그룹이며, 이를 잘 읽어낼 수 있어야 한다!★★
+추가
[종류]
ㅣ : symbolic link
b : block device (저장장치)
c : character device (터미널)
[최근 수정일]
touch 사용하면 바뀜
ownership 변경 ]
- chown : 소유자 변경 명령어 - chgrp : 소유그룹 변경 명령어 - ll : ls -l의 축약 명령어 실습환경 확인>> [root@localhost ~]# cd /home/test01 [root@localhost test01]# ll ~/a.txt → ~ : 홈디렉터리 -rw-r--r-- 1 root root 0 6월 29 10:07 /root/a.txt [root@localhost test01]# ll ./a.txt → 상대경로! -rw-rw-r-- 1 test01 test01 0 6월 29 10:09 ./a.txt owner , group 둘다 변경>> [root@localhost test01]# chown root:root /home/test01/a.txt [root@localhost test01]# ll /home/test01/a.txt -rw-rw-r-- 1 root root 0 6월 29 10:09 /home/test01/a.txt owner 만 변경>> [root@localhost test01]# chown test02 /home/test01/a.txt [root@localhost test01]# ll /home/test01/a.txt -rw-rw-r-- 1 test02 root 0 6월 29 10:09 /home/test01/a.txt group 만 변경>> [root@localhost test01]# chown :tgroup /home/test01/a.txt [root@localhost test01]# ll /home/test01/a.txt -rw-rw-r-- 1 test02 tgroup 0 6월 29 10:09 /home/test01/a.txt [root@localhost test01]# chgrp root /home/test01/a.txt [root@localhost test01]# ll /home/test01/a.txt -rw-rw-r-- 1 test02 root 0 6월 29 10:09 /home/test01/a.txt |
'☁ Server > 기초 따라가기' 카테고리의 다른 글
Compress(tar,gzip,bzip2) (0) | 2022.07.17 |
---|---|
Special permission & ACL(확장퍼미션) (0) | 2022.07.08 |
Permission (0) | 2022.07.08 |
사용자 & 그룹 관리 (0) | 2022.06.30 |
vi editor (0) | 2022.06.30 |
Comments