일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- pvcreate
- swapon
- vagrant kubernetes
- chatGPT
- ssh
- journalctl
- ansible
- MSBing
- HTTPD
- docker network
- vgcreate
- 같은폴더
- tar
- M365필터
- yum
- chmod
- 리다이렉션
- newbingai
- 프로세스
- 날짜변경
- 랜카드인식불량
- docker
- Kubernetes
- 엑셀파일명변경
- lvcreate
- nmcli
- firewalld
- docker image
- permission
- mount
- Today
- Total
becool
20210414 (수) 본문
9:32 review
posix acl
1. 일반 acl
u::PERMS
u:USER:PERMS
g::PERMS
g:GROUP:PERMS
o::PERMS
[user@localhost dir1]$ getfacl userfile1 → ACL 설정된 파일 아래 볼드 두줄이 추가된 걸 볼 수 있다.
# file: userfile1
# owner: user
# group: user
user::rw-
user:user01:rw-
group::rw-
mask::rw-
other::r--
[user@localhost dir1]$ getfacl userfile2 → 일반 파일
# file: userfile2
# owner: user
# group: user
user::rw-
group::rw-
other::r--
2. default acl
-D
d:u::PERMS
d:u:USER:PERMS
d:g::PERMS
d:g:GROUP:PERMS
d:o::PERMS
디폴트 acl 삭제 옵션 : -k [FILE]
posix acl 삭제 옵션 (일반파일로되돌아감) : -b [FILE]
3. 리커시브
[user@localhost dir1]$ setfacl -R -m u:user03:rwx subdir3
하위 디렉터리, 파일 모두에 적용됨.
단, 실행권한이 디렉터리/파일에 모두 적용되어서 적합치 않음.
→ 보완 : [user@localhost dir1]$ setfacl -R -m u:user02:rwX subdir3
대문자를 사용하여 적용하면 디렉터리에만 x권한을 부여하고 , 파일에는 부여하지 않음.
파일과 디렉터리는 생성시점에 mask값이 다르다.
user의 umask 값이 적용된다.
[user@localhost subdir2]$ getfacl userfile1
# file: userfile1
# owner: user
# group: user
user::rw-
user:user01:rwx #effective:rw-
group::rwx #effective:rw-
group:user02:r-x #effective:r--
mask::rw-
other::r--
[user@localhost subdir2]$ getfacl userdir1
# file: userdir1
# owner: user
# group: user
user::rwx
user:user01:rwx
group::rwx
group:user02:r-x
mask::rwx
other::r-x
default:user::rwx
default:user:user01:rwx
default:group::rwx
default:group:user02:r-x
default:mask::rwx
default:other::r-x
=======================================================
작업 예약
일회성 작업 예약 - at
주기적 작업 예약 - cron
- System Cron
- User Cron
작업 예약 at [TIMESPEC]
작업 확인 atq 또는 at -l
작업 삭제 atrm 또는 at -d [JOB Number]
※ 백그라운드에서 실행됨.
USER cron
$ crontab
root 사용자는 다른 사용자의 작업예약을 확인/수정 할 수 있다.
crontab -u [USER] -l
[root@localhost 20210414]# crontab -u user -l : 확인
[root@localhost 20210414]# crontab -e -u user : 편집
[root@localhost work]# crontab -u user01 -r : 예약내역 삭제
메타 문자 TIME SPEC
* always, don't care
, 연속되지않은 복수 목록지정
- 연속되는 목록 범위지정
/ 특정 주기를 지정
min | hr | day | month | week | 설명 |
10,50 | 1 | 3 | * | * | 매월 3일 오전 1시 10분, 1시 50분 작업 |
15,45 | 1 | 20 | * | * | 매월 20일 오후 1시 15분, 1시 45분 작업 |
0 | 9-11 | * | * | * | 매일 9, 10, 11시 정각 |
0 | 1 | 1-7 | * | 1 | 매월 첫째주 월요일 오전 1시 작업 |
*/10 | 15 | * | * | 1,3,5 | 매월 월수금 오후 5시에 10분 간격으로 작업 |
*/5 | * | * | * | 1,3,5 | 매 5분 마다 월수금 |
20 | 12,13 | * | * | * | 12시 20분 1시 20분 |
2 | 8-20/3 | * | * | * | 8시 2분, 11시 2분, 14시 2분, 17시 2분, 20시 2분 (8시부터20시까지 3시간 간격) |
시스템 크론 : /etc/crontab
[root@localhost 20210414]# ls -ld /etc/cron*
drwxr-xr-x. 2 root root 54 Mar 31 13:02 /etc/cron.d
drwxr-xr-x. 2 root root 57 Mar 31 13:02 /etc/cron.daily
-rw-------. 1 root root 0 Aug 9 2019 /etc/cron.deny
drwxr-xr-x. 2 root root 41 Mar 31 13:02 /etc/cron.hourly
drwxr-xr-x. 2 root root 6 Jun 10 2014 /etc/cron.monthly
-rw-r--r--. 1 root root 451 Jun 10 2014 /etc/crontab
drwxr-xr-x. 2 root root 6 Jun 10 2014 /etc/cron.weekly
[root@localhost 20210414]# cd /etc/cron.d
[root@localhost cron.d]# ls -l
total 12
-rw-r--r--. 1 root root 128 Aug 9 2019 0hourly
-rw-r--r--. 1 root root 108 Sep 30 2020 raid-check
-rw-------. 1 root root 235 Apr 1 2020 sysstat
[TIMESPEC] [USER] [COMMAND]
# * * * * * root ls -l
아나크론 /etc/anacrontab
- cron과 유사하나 작업 예약 시점에 시스템 종료가 된 경우에도 부팅 시 해당 작업 실행
===========================
디스크 관리
디스크 구조
플래터(Platter) 논리적 구조
트랙
섹터
실린더
디스크 장착 → 파티셔닝 → File System
1. MBR 파티셔닝
※ IBM -> de facto standard. (1980s) : MBR파티셔닝
BIOS 펌웨어를 사용하는 컴퓨터에서 사용되는 방식
최대 4개의 Primary Partition을 만들 수 있음.
최대 용량 2TB 지원
Primary Partition : OS를 설치할 수 있는 파티션
Extended Partition : Logical Partition의 정보를 담는 파티션, Data저장 목적으로 사용하지 않음.
Logical Partition : OS를 설치할 수 없고 Data 저장만 가능한 파티션
2. GPT 파티셔닝
UEFI 펌웨어를 사용하는 컴퓨터에서 사용되는 방식
최대 128개의 파티션을 만들 수 있음.
최대 용량 8ZB 지원 (80억테라바이트)
(TB테라 → PB페타 → EB엑사 → ZB제타)
디스크 인터페이스
E-IDE
S-ATA
SCSI
SAS(SA-SCSI)
============================
'linux' 카테고리의 다른 글
20210416 (금) (0) | 2021.04.16 |
---|---|
20210415 (목) (0) | 2021.04.15 |
date 표현 (0) | 2021.04.14 |
20210413 (화) (0) | 2021.04.13 |
20210412 (월) (0) | 2021.04.12 |