0Pricing
Linux Command Line Mastery · 강의

chmod와 chown을 활용한 파일 권한과 소유권

Linux 권한의 작동 방식과 chmod 및 chown으로 권한을 설정하는 방법을 학습해 사용자 관리와 보안을 연결해 보세요.

chmod와 chown을 활용한 파일 권한과 소유권은(는) CoddyKit의 무료 Linux Command Line Mastery 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Linux Command Line Mastery 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Permissions Connect Users and Files

Now that you can create users and groups, the next step is controlling what each user can do with files. Linux enforces this through file permissions and ownership.

Reading ls -l Output

ls -l shows a permission string like -rwxr-xr--. The first char is the file type; the next three triples are permissions for owner, group, and others.

ls -l /etc/passwd

The Three Permission Bits

  • r (read) = 4
  • w (write) = 2
  • x (execute) = 1

Add them per triple to get an octal digit. rwx = 7, r-x = 5, r-- = 4.

chmod with Octal

chmod 754 file sets owner rwx, group r-x, others r--.

chmod 754 script.sh
ls -l script.sh

chmod with Symbols

You can also add or remove specific bits: u=user, g=group, o=others, a=all.

chmod u+x script.sh
chmod go-w script.sh

Making a Script Executable

A very common task: give a newly written script execute permission so you can run it directly.

chmod +x deploy.sh
./deploy.sh

Changing Ownership with chown

chown user:group file reassigns who owns a file. This ties directly into the user/group management you already learned.

sudo chown alice:developers project.txt

Changing Only the Group

You can change just the group with chgrp or with the :group form of chown.

sudo chown :developers project.txt

Recursive Changes

The -R flag applies changes to a directory and everything inside it. Use carefully.

sudo chown -R alice:developers /srv/app

Default Permissions and umask

New files get default permissions masked by umask. A umask of 022 removes write for group and others, producing 644 files and 755 directories.

umask

A Safe Workflow

When sharing a project directory with a team: set the group, grant group read/write, and keep others restricted.

sudo chown -R :developers /srv/app
sudo chmod -R 770 /srv/app

Quick Check

What octal value represents rwxr-xr--?

Recap

You now control access to files:

  • Permissions split into owner/group/others with r(4)/w(2)/x(1)
  • chmod sets modes via octal or symbols
  • chown/chgrp reassign ownership
  • -R applies recursively; umask sets defaults

자주 묻는 질문

“chmod와 chown을 활용한 파일 권한과 소유권” 강의는 무료인가요?

네 — “chmod와 chown을 활용한 파일 권한과 소유권” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Linux Command Line Mastery 강의 전체를 잠금 해제할 수 있습니다. Linux Command Line Mastery 강의에는 총 4개의 강의가 포함되어 있습니다.

“chmod와 chown을 활용한 파일 권한과 소유권”에서 뭘 배우나요?

Linux 권한의 작동 방식과 chmod 및 chown으로 권한을 설정하는 방법을 학습해 사용자 관리와 보안을 연결해 보세요. 브라우저에서 직접 실행하는 실습 코드로 Linux Command Line Mastery을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Linux Command Line Mastery을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Linux Command Line Mastery은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“chmod와 chown을 활용한 파일 권한과 소유권” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Linux Command Line Mastery 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Linux Command Line Mastery 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 사용자 및 그룹 관리: `useradd`, `usermod`, `groupadd`
  2. 네트워크 명령 입문: `ping`, `ip`, `netstat`
  3. 안전한 원격 접속: `ssh`와 `scp`
  4. chmod와 chown을 활용한 파일 권한과 소유권
← Linux Command Line Mastery(으)로 돌아가기