Monu Tools

מחשבון chmod

המרת הרשאות קבצים של Unix בין תיבות סימון, octal (כמו 755) וסימון סמלי (כמו rwxr-xr-x).

כיצד להשתמש במחשבון chmod

  1. 01

    סמנו את תיבות הקריאה, הכתיבה וההרצה עבור בעלים, קבוצה ואחרים.

  2. 02

    או הקלידו ערך octal כמו 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?

octal (כמו 755) מקודד את ההרשאות כמספרים, ואילו סמלי (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/he/chmod-calculator" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>

כלים קשורים