본문 바로가기
Raspberry Pi (Linux, ubuntu)

chmod - Replace permissions for file and folders on Linux(Raspberry Pi)

by 소나무기운 2022. 3. 7.
반응형

[2022/04/06] Add title image

[2022/03/07] First Edit

소나무 기운 ,  전자제품 개발/생산

Replace permissions for file and folders on Linux(Raspberry Pi)

리눅스(라즈베리파이)에서 파일 및 폴더의 권한 바꾸기

 

 

 

 

chmod , chmod --help

pi@raspberrypi:~ $ chmod --help
사용법: chmod [옵션]... MODE[,MODE]... FILE...
  또는: chmod [옵션]... 8진수-MODE FILE...
  또는: chmod [옵션]... --reference=RFILE FILE...
Change the mode of each FILE to MODE.
With --reference, change the mode of each FILE to that of RFILE.

  -c, --changes          like verbose but report only when a change is made
  -f, --silent, --quiet  suppress most error messages
  -v, --verbose          output a diagnostic for every file processed
      --no-preserve-root  do not treat '/' specially (the default)
      --preserve-root    fail to operate recursively on '/'
      --reference=RFILE  use RFILE's mode instead of MODE values
  -R, --recursive        change files and directories recursively
      --help     이 도움말을 표시하고 끝냅니다
      --version  버전 정보를 출력하고 끝냅니다

Each MODE is of the form '[ugoa]*([-+=]([rwxXst]*|[ugo]))+|[-+=][0-7]+'.

GNU coreutils online help: <https://www.gnu.org/software/coreutils/>
Report chmod translation bugs to <https://translationproject.org/team/>
Full documentation at: <https://www.gnu.org/software/coreutils/chmod>
or available locally via: info '(coreutils) chmod invocation'

 

 

example

chmod 777 filename

777 : [option]  

        user permisions : excute, write, read

        group permisions : excute, write, read

        other permisions : excute, write, read

 

chmod -R 777 filename

-R : [option]

      Applying chmod settings to both subdirectories and files.

      하위 모든 파일과 디렉토리에 적용한다.

 

마무리

 

 

참고문헌

 

 

 

 

 

 

틀린 부분이나 질문은 댓글 달아주세요.

즐거운 하루 보내세요. 감사합니다.

 

 

반응형

댓글