모든 파일과 디렉토리의 퍼미션 한번에 설정하기
작성자 정보
- 관리자 작성
- 작성일
컨텐츠 정보
- 2,479 조회
- 0 추천
- 목록
본문
모든 파일과 디렉토리의 퍼미션 한번에 설정하기
다음은 현재 디렉토리에 존재하는 모든 파일과 디렉토리의 퍼미션을 동시에 설정하는 예입니다.
현재 디렉토리에는 보시는 바와 같이 여러 개의 파일이 존재합니다.
[root@su250 conf.d]# ls -l 합계 52 drwxr-xr-x 2 root root 4096 2008-12-22 22:03 conf -rw-r--r-- 1 root root 295 2005-12-08 01:45 manual.conf -rwxr-xr-x 1 root root 1796 2005-04-22 21:53 perl.conf -rwxr-xr-x 1 root root 560 2008-09-14 00:15 php.conf -rwxr-xr-x 1 root root 566 2005-12-06 02:26 proxy_ajp.conf -rwxr-xr-x 1 root root 1671 2008-10-07 23:01 python.conf -rw-r--r-- 1 root root 332 2008-10-25 05:09 squid.conf -rw-r--r-- 1 root root 9534 2008-07-15 22:44 ssl.conf drwxr-xr-x 2 root root 4096 2009-01-07 22:54 su -rw-r--r-- 1 root root 352 2004-09-09 23:22 webalizer.conf -rw-r--r-- 1 root root 299 2004-09-09 15:16 welcome.conf [root@su250 conf.d]# |
현재 디렉토리에 존재하는 모든 파일들의 퍼미션을 동시에 모두 700으로 설정 하였습니다.
그런 다음 "ls -l"로 변경된 퍼미션설정을 확인한 것입니다.
[root@su250 conf.d]# chmod 700 * [root@su250 conf.d]# [root@su250 conf.d]# ls -l 합계 52 drwx------ 2 root root 4096 2008-12-22 22:03 conf -rwx------ 1 root root 295 2005-12-08 01:45 manual.conf -rwx------ 1 root root 1796 2005-04-22 21:53 perl.conf -rwx------ 1 root root 560 2008-09-14 00:15 php.conf -rwx------ 1 root root 566 2005-12-06 02:26 proxy_ajp.conf -rwx------ 1 root root 1671 2008-10-07 23:01 python.conf -rwx------ 1 root root 332 2008-10-25 05:09 squid.conf -rwx------ 1 root root 9534 2008-07-15 22:44 ssl.conf drwx------ 2 root root 4096 2009-01-07 22:54 su -rwx------ 1 root root 352 2004-09-09 23:22 webalizer.conf -rwx------ 1 root root 299 2004-09-09 15:16 welcome.conf [root@su250 conf.d]# |
이번 예에서 눈 여겨 보실 것은 동일한 퍼미션을 여러 개의 파일뿐 아니라 디렉토리들도 동시에 같은 퍼미션으로 설정이 되었다는 점입니다.
즉, 리눅스에서는 디렉토리를 하나의 특수한 파일로인 인식하고 있습니다.
즉, 파일리스트를 내용으로 하는 특수한 파일이 바로 디렉토리인 것입니다.
관련자료
-
이전
-
다음