Linux(Ubuntu)에서 권한 확인, 설정하기
현재 디렉토리 확인
$ ls -al

Type
- -로 시작하는 건 파일
- d로 시작하는 건 디렉토리
권한
- r: Read = 4
- w:Write = 2
- x:eXecute = 1
# sample
-rwxrwxrwx (777)
-r--r--r-- (444)
-rwx--x--x (711)
- 2~4 필드: 소유주(User) 권한
- 5~7 필드: 그룹(Group) 권한
- 8~10필드: 나머지(Others) 권한
권한 변경(설정)
chmod 755 test.txt # 소유자에게 rwx, 나머지에겐 r-x
chmod o+rw test.txt # others에게 rw-
chmod 700 * # 현재 경로의 모든 폴더와 파일 권한 수정
chmod -R 755 folder # folder경로의 모든 폴더와 파일 권한 수정
하위 파일과 폴더들에 한번에 적용하기
- -R 옵션으로 하위 모든 파일에 대해 권한을 수정한다.
chmod -R 777 folder