Monu Tools

حاسبة chmod

حوّل أذونات ملفات Unix بين مربعات الاختيار، والترميز الثُماني (octal، مثل 755)، والترميز الرمزي (symbolic، مثل rwxr-xr-x).

كيفية استخدام حاسبة chmod

  1. 01

    علّم مربعات القراءة والكتابة والتنفيذ للمالك والمجموعة والآخرين.

  2. 02

    أو اكتب قيمة ثُمانية مثل 755 لضبط المربعات تلقائياً.

  3. 03

    انسخ أمر chmod الجاهز للتنفيذ.

What Unix permissions are

Unix file permissions control who can read, write and execute a file or directory, split across three groups: the owner, the group, and everyone else. This calculator converts between interactive checkboxes, the numeric octal form like 755, and the symbolic form like rwxr-xr-x, keeping all three in sync.

How the numbers work

Each group gets three bits, read (4), write (2) and execute (1), and you add them up to get one digit. So 7 is read plus write plus execute (rwx), 5 is read plus execute (r-x), and 6 is read plus write (rw-). Three digits, one per group, give you the familiar permission number.

Common values worth knowing

The common values are worth memorizing. 755 suits directories and executables: the owner has full access while group and others can read and execute but not write. 644 suits normal web files: the owner can read and write, everyone else can only read.

For sensitive files, 600 keeps things tight: only the owner can read or write, and nobody else has any access, which is what SSH private keys and similar secrets need.

Special bits and the fourth digit

There is also an optional fourth leading digit for special bits, setuid, setgid and the sticky bit, which change how programs run or how a shared directory behaves. When one is set, the execute position shows as s or t instead of x.

How to use the output

The calculator gives you the ready-to-run chmod command to copy, and runs entirely in your browser. It is a reference and converter, so it does not change any files itself.

الأسئلة الشائعة

ماذا تعني 755 و644؟

تمنح 755 المالك صلاحية كاملة وللآخرين جميعاً القراءة والتنفيذ، وتُستخدم للأدلة والنصوص البرمجية. وتمنح 644 المالك القراءة والكتابة وللآخرين جميعاً القراءة فقط، وتُستخدم للملفات العادية.

ماذا تعني 777 وهل هي آمنة؟

تمنح 777 القراءة والكتابة والتنفيذ للجميع. وهي غير آمنة دائماً تقريباً على الخادم لأن أي مستخدم يستطيع تعديل الملف. يُفضَّل 755 أو 644 بدلاً منها.

كيف أجعل ملفاً قابلاً للتنفيذ؟

أضف بِت التنفيذ. من 644 تنتقل إلى 755 (أو chmod +x)، مما يفعّل التنفيذ للمالك والمجموعة والآخرين.

ما الفرق بين الترميز الرمزي والثُماني؟

يرمّز الثُماني (octal، مثل 755) الأذونات كأرقام، بينما يصفها الرمزي (symbolic، مثل rwxr-xr-x أو u+x) كأحرف. تعرض هذه الأداة كليهما وتبقيهما متزامنين.

ما هي setuid وsetgid وبِت الالتصاق (sticky)؟

هي رقم رابع يتصدر القيمة. تشغّل setuid وsetgid برنامجاً بصلاحيات مالكه أو مجموعته، وبِت الالتصاق (sticky) على دليل يمنع المستخدمين من حذف ملفات بعضهم البعض (كما في /tmp).

لماذا يُعرض بِت التنفيذ كـ s أو t؟

عند ضبط setuid أو setgid أو بِت الالتصاق (sticky)، يُعرض موضع التنفيذ كـ s أو t بدلاً من x للإشارة إلى أن البِت الخاص نشط.

المصادر

ضمّن هذه الأداة

أضف هذه الأداة إلى موقعك الخاص. انسخ المقتطف أدناه، ويبقى محدّثاً تلقائياً.

<iframe src="https://monu.tools/embed/ar/chmod-calculator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

أدوات ذات صلة