JustUtils
shield_lockLinux permissions · explained as you click

คำอธิบายและเครื่องคำนวณ Chmod 700

ทำความเข้าใจ chmod 700 สำหรับโฟลเดอร์และสคริปต์ส่วนตัว ตรวจสิทธิ์ที่ให้ และสร้างคำสั่งพร้อมใช้

STEP 1

What are you changing?

Execute means different things for a file and a directory.

For a directory: Read lists names, Write adds or removes items, and Execute lets someone enter the directory and reach items inside.

STEP 2

Choose access

Owner permissions

Owner

digit 1 · 7

rwx

Usually you or the account that created it.

Group permissions

Group

digit 2 · 0

---

Accounts collected in the file's owning group.

Everyone else permissions

Everyone else

digit 3 · 0

---

Any other account on the same system.

YOUR RESULT

700rwx------

u=rwx,g=,o=

Owner

Can list names, add or remove items, enter

Group

Can no access

Everyone else

Can no access

THE PART MOST CALCULATORS SKIP

See what will actually change

Find the numeric mode with stat -c '%a' path on Linux, then review each permission being added or removed.

644arrow_forward700
addOwner: executeremoveGroup: readremoveEveryone else: read

TOP 5 EVERYDAY MODES

Start from the job, not the digits

Each common mode has its own explainer page and loads directly into this calculator. Pick the situation that sounds like yours, then check the access before copying.

CHMOD IN ONE MINUTE

What is chmod?

Every Linux file carries a tiny access list. chmod is the command that rewrites that list. It does not move the file, change its contents, or choose its owner—it only changes what the owner, group, and everyone else are allowed to do.

Think of the three digits as three keycards. The first card belongs to the owner, the second to the group, and the third to everyone else. Each card gets points for Read (4), Write (2), and Execute (1). Add the allowed actions to get that card's digit.

The only math you need

4Read+2Write+1Execute=7all three
Why 777 is not a universal fix: it hands every keycard every permission. Fix ownership or choose the smallest access that solves the real need instead.

DIGIT 1 · u

Owner

Usually you or the account that created it.

DIGIT 2 · g

Group

Accounts collected in the file's owning group.

DIGIT 3 · o

Everyone else

Any other account on the same system.

คำอธิบาย CHMOD 700

ตรวจความหมายของ chmod 700 ก่อนใช้กับไฟล์หรือไดเรกทอรี

ตัวเลขแต่ละหลักของ 700 แทนสิทธิ์ owner, group และ others ตามลำดับ ควรอ่านรูปแบบ rwx ที่เครื่องมือแสดงและตรวจว่ากลุ่มผู้ใช้แต่ละกลุ่มจำเป็นต้องอ่าน เขียน หรือเรียกใช้จริงหรือไม่

ตรวจโหมดนี้ในสถานการณ์จริง

  • ตรวจชนิดเป้าหมาย เพราะ execute มีความหมายต่างกันระหว่างไฟล์กับไดเรกทอรี
  • ใช้ ls -l ตรวจ owner, group และสิทธิ์ปัจจุบันก่อนแก้ไข
  • เริ่มกับไฟล์ตัวอย่างหนึ่งรายการก่อนใช้ wildcard หรือ -R
  • ทดสอบด้วยบัญชีผู้ใช้ที่ต้องเข้าถึงจริง แล้วลดสิทธิ์ส่วนที่ไม่จำเป็น

ข้อจำกัดที่คำสั่ง chmod อย่างเดียวแก้ไม่ได้

หาก account ที่ต้องใช้งานไม่ใช่ owner หรือไม่อยู่ใน group ที่ถูกต้อง การเพิ่มสิทธิ์ให้ others อาจเปิดกว้างเกินจำเป็น ควรแก้ ownership หรือ group ก่อน

ACL, umask, mount option, SELinux และ policy ของ container อาจมีผลเพิ่มเติม แม้ตัวเลข chmod จะแสดงสิทธิ์ตามที่คาด