{"id":67419,"date":"2026-10-21T10:24:21","date_gmt":"2026-10-21T07:24:21","guid":{"rendered":"https:\/\/wpcalc.com\/en\/?p=67419"},"modified":"2026-10-21T10:24:21","modified_gmt":"2026-10-21T07:24:21","slug":"chmod-calculator-linux-file-permissions","status":"publish","type":"post","link":"https:\/\/wpcalc.com\/en\/web-tools\/chmod-calculator-linux-file-permissions\/","title":{"rendered":"Chmod Calculator \u2013 Linux File Permissions"},"content":{"rendered":"<section class=\"not-prose calculator-box\" aria-labelledby=\"calculator-title\"><div class=\"flex items-baseline sm:items-center justify-between gap-2 sm:gap-3\"><div class=\"flex flex-col sm:flex-row sm:items-center gap-2\"><span class=\"icon icon-calculator text-primary-700! text-base! dark:text-primary-300!\" aria-hidden=\"true\"><\/span><h2 id=\"calculator-title\" class=\"text-lg font-display font-bold\">Convert Linux Permissions Between Checkboxes, Octal and Symbolic Notation<\/h2><\/div><div class=\"calcdash-favorite group\">\n  <button type=\"button\" class=\"favorite\" id=\"favorite\" data-favorite-id=\"67419\" data-favorite-title=\"Chmod\" data-favorite-url=\"https:\/\/wpcalc.com\/en\/web-tools\/chmod-calculator-linux-file-permissions\/\" data-favorite-excerpt=\"Convert Linux file permissions between a clickable checkbox grid, octal code (e.g. 755) and symbolic notation (e.g. rwxr-xr-x). Get ready-to-use chmod commands, an ls -l preview and security notes for regular files and directories.\" aria-label=\"Add to Favorites\" data-favorite-icon=\"icon icon-conversion\">\n    <span class=\"icon icon-shape-star-empty\" aria-hidden=\"true\"><\/span>\n  <\/button>\n  <div class=\"calcdash-favorite__tip\" aria-hidden=\"true\">\n   <span class=\"favorite-tooltip\" id=\"favorite-tooltip\"><\/span>\n  <\/div>\n  <span class=\"sr-only\" role=\"status\" id=\"favorite-status\"><\/span>\n<\/div><\/div><form action=\"https:\/\/wpcalc.com\/en\/web-tools\/chmod-calculator-linux-file-permissions\/\" method=\"POST\" class=\"calculator\" id=\"calculator-67419\" data-post=\"67419\"><fieldset class=\"fieldset-input is-3\"><legend class=\"sr-only\">Input Fields<\/legend><div class=\"field is-single\" id=\"input-1\"><label for=\"field-1\">Input method<\/label><div class=\"grid grid-cols-1\"><select id=\"field-1\" name=\"input_method\"><option value=\"check\" selected>Checkboxes (permission grid)<\/option><option value=\"octal\">Octal code (e.g. 755 or 4755)<\/option><option value=\"sym\">Symbolic notation (e.g. rwxr-xr-x)<\/option><option value=\"preset\">Common presets<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field is-single\" id=\"input-2\" hidden><label for=\"field-2\">Preset<\/label><div class=\"grid grid-cols-1\"><select id=\"field-2\" name=\"preset\"><option value=\"600\">600 \u2014 rw------- (private file)<\/option><option value=\"644\">644 \u2014 rw-r--r-- (normal files)<\/option><option value=\"700\">700 \u2014 rwx------- (private directory)<\/option><option value=\"755\" selected>755 \u2014 rwxr-xr-x (programs, web files)<\/option><option value=\"775\">775 \u2014 rwxrwxr-x (shared, group-writable)<\/option><option value=\"777\">777 \u2014 rwxrwxrwx (world-writable \u2014 risky)<\/option><option value=\"1777\">1777 \u2014 rwxrwxrwt (sticky, like \/tmp)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"field is-single\" id=\"input-3\" hidden><label for=\"field-3\">Octal code<\/label><input type=\"text\" name=\"octal_code\" id=\"field-3\" aria-describedby=\"calc-info-3\" placeholder=\"755 or 4755\" step=\"any\" value=\"755\"\/><small id=\"calc-info-3\">Three or four digits 0\u20137: owner, group, others \u2014 optionally with a leading special digit (setuid 4, setgid 2, sticky 1).<\/small><\/div><div class=\"field is-single\" id=\"input-4\" hidden><label for=\"field-4\">Symbolic notation<\/label><input type=\"text\" name=\"symbolic_notation\" id=\"field-4\" aria-describedby=\"calc-info-4\" placeholder=\"rwxr-xr-x\" step=\"any\" value=\"rwxr-xr-x\"\/><small id=\"calc-info-4\">Nine characters r\/w\/x\/s\/t, or a full ls -l string with its leading type character, e.g. -rwxr-xr-x.<\/small><\/div><div class=\"field\" id=\"input-5\"><label for=\"field-5\">File type<\/label><div class=\"grid grid-cols-1\"><select id=\"field-5\" name=\"file_type\"><option value=\"file\" selected>Regular file (-)<\/option><option value=\"dir\">Directory (d)<\/option><\/select><svg class=\"pointer-events-none col-start-1 row-start-1 mr-2 size-5 self-center justify-self-end text-gray-500 sm:size-4\" viewBox=\"0 0 16 16\" fill=\"currentColor\" aria-hidden=\"true\" data-slot=\"icon\">\n              <path fill-rule=\"evenodd\" d=\"M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z\" clip-rule=\"evenodd\" \/>\n            <\/svg><\/div><\/div><div class=\"is-single field\" id=\"input-6\"><span class=\"font-semibold\">Owner (u)<\/span><\/div><div class=\"field is-checkbox\" id=\"input-7\"><input type=\"checkbox\" id=\"field-7\" value=\"1\" checked=\"checked\"\/><label for=\"field-7\">Read<\/label><\/div><div class=\"field is-checkbox\" id=\"input-8\"><input type=\"checkbox\" id=\"field-8\" value=\"1\" checked=\"checked\"\/><label for=\"field-8\">Write<\/label><\/div><div class=\"field is-checkbox\" id=\"input-9\"><input type=\"checkbox\" id=\"field-9\" value=\"1\" checked=\"checked\"\/><label for=\"field-9\">Execute<\/label><\/div><div class=\"is-single field\" id=\"input-10\"><span class=\"font-semibold\">Group (g)<\/span><\/div><div class=\"field is-checkbox\" id=\"input-11\"><input type=\"checkbox\" id=\"field-11\" value=\"1\" checked=\"checked\"\/><label for=\"field-11\">Read<\/label><\/div><div class=\"field is-checkbox\" id=\"input-12\"><input type=\"checkbox\" id=\"field-12\" value=\"1\"\/><label for=\"field-12\">Write<\/label><\/div><div class=\"field is-checkbox\" id=\"input-13\"><input type=\"checkbox\" id=\"field-13\" value=\"1\" checked=\"checked\"\/><label for=\"field-13\">Execute<\/label><\/div><div class=\"is-single field\" id=\"input-14\"><span class=\"font-semibold\">Others (o \u2014 everyone else)<\/span><\/div><div class=\"field is-checkbox\" id=\"input-15\"><input type=\"checkbox\" id=\"field-15\" value=\"1\" checked=\"checked\"\/><label for=\"field-15\">Read<\/label><\/div><div class=\"field is-checkbox\" id=\"input-16\"><input type=\"checkbox\" id=\"field-16\" value=\"1\"\/><label for=\"field-16\">Write<\/label><\/div><div class=\"field is-checkbox\" id=\"input-17\"><input type=\"checkbox\" id=\"field-17\" value=\"1\" checked=\"checked\"\/><label for=\"field-17\">Execute<\/label><\/div><div class=\"is-single field\" id=\"input-18\"><span class=\"font-semibold\">Special bits<\/span><\/div><div class=\"field is-checkbox\" id=\"input-19\"><input type=\"checkbox\" id=\"field-19\" value=\"1\"\/><label for=\"field-19\">Setuid<\/label><\/div><div class=\"field is-checkbox\" id=\"input-20\"><input type=\"checkbox\" id=\"field-20\" value=\"1\"\/><label for=\"field-20\">Setgid<\/label><\/div><div class=\"field is-checkbox\" id=\"input-21\"><input type=\"checkbox\" id=\"field-21\" value=\"1\"\/><label for=\"field-21\">Sticky<\/label><\/div><\/fieldset><div class=\"buttons\"><button type=\"submit\" data-text=\"Re-Calculate\" id=\"calculate-button\" data-post=\"67419\">Calculate<\/button><button type=\"reset\">Reset<\/button><\/div><div class=\"field is-checkbox hidden!\" id=\"field-auto-calc\"><input type=\"checkbox\" id=\"auto-calc\"><label for=\"auto-calc\">Calculate automatically<\/label><small>If enabled, the result will update automatically when you change any value.<\/small><\/div><div class=\"fieldset-result is-hidden\" aria-labelledby=\"result-title\" aria-live=\"polite\" role=\"region\"> <h3 class=\"result-title bg-gradient-to-r from-primary-50 to-gray-50 dark:from-primary-900 dark:to-gray-800\" id=\"result-title\"><span class=\"icon icon-s-pulse\" aria-hidden=\"true\"><\/span> Your Permissions<\/h3><div class=\"result-box\"><div class=\"field-result\" id=\"output-1\"><span class=\"field-title\"><span>Numeric (octal) mode<\/span><\/span><span class=\"field-value\" id=\"result-1\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result\" id=\"output-2\"><span class=\"field-title\"><span>Symbolic mode<\/span><\/span><span class=\"field-value\" id=\"result-2\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-3\"><span class=\"field-title\"><span>chmod command (numeric mode)<\/span><\/span><span class=\"field-value\" id=\"result-3\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-4\"><span class=\"field-title\"><span>chmod command (symbolic mode)<\/span><\/span><span class=\"field-value\" id=\"result-4\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-5\"><span class=\"field-title\"><span>ls -l style preview<\/span><\/span><span class=\"field-value\" id=\"result-5\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-6\"><span class=\"field-title\"><span>What these permissions mean<\/span><\/span><span class=\"field-value\" id=\"result-6\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><div class=\"field-result is-column\" id=\"output-7\"><span class=\"field-title\"><span>Security notes<\/span><\/span><span class=\"field-value\" id=\"result-7\"><\/span><button type=\"button\" class=\"copy-result\" data-tooltip=\"Copy Result\" aria-label=\"Copy Result\"><span class=\"copy-icon icon icon-document-copy\" aria-hidden=\"true\"><\/span><\/button><\/div><\/div><div class=\"result-actions\"><button type=\"button\" class=\"copy-link\"><svg viewBox=\"0 0 20 20\" fill=\"currentColor\" aria-hidden=\"true\"><path d=\"M12.232 4.232a2.5 2.5 0 0 1 3.536 3.536l-1.225 1.224a.75.75 0 0 0 1.061 1.06l1.224-1.224a4 4 0 0 0-5.656-5.656l-3 3a4 4 0 0 0 .225 5.865.75.75 0 0 0 .977-1.138 2.5 2.5 0 0 1-.142-3.667l3-3Z\"\/><path d=\"M11.603 7.963a.75.75 0 0 0-.977 1.138 2.5 2.5 0 0 1 .142 3.667l-3 3a2.5 2.5 0 0 1-3.536-3.536l1.225-1.224a.75.75 0 0 0-1.061-1.06l-1.224 1.224a4 4 0 1 0 5.656 5.656l3-3a4 4 0 0 0-.225-5.865Z\"\/><\/svg><span class=\"copy-link__text\">Copy link to this calculation<\/span><\/button><span class=\"sr-only\" role=\"status\" id=\"copy-link-status\"><\/span><\/div><\/div><a href=\"#respond\" class=\"hidden transition-opacity duration-300 opacity-0 w-50 text-sm justify-center items-center gap-2 px-4 py-2 rounded bg-gray-200 text-gray-700 hover:bg-gray-300\" id=\"leave-comment\"><span class=\"icon icon-comments\" aria-hidden=\"true\"><\/span>Leave a Comment<\/a><\/form><\/section><section id=\"calc-reactions\" class=\"not-prose hidden my-12 bg-gradient-to-r from-primary-50 to-gray-50 border border-indigo-100 rounded-xl px-6 py-4 shadow-sm\" data-post=\"67419\" aria-live=\"polite\" aria-labelledby=\"calc-reactions-title\"><p id=\"calc-reactions-title\" class=\"text-sm text-gray-500 text-center mb-2\">How did this result make you feel?<\/p><div role=\"group\" aria-labelledby=\"calc-reactions-title\" class=\"grid grid-cols-3 sm:flex sm:flex-row sm:justify-around gap-4 sm:items-center sm:flex-wrap\"><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"like\"><span class=\"reaction-count\" data-reaction-count=\"like\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude00 <\/span><span class=\"reaction-description font-medium\">Like <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"helpful\"><span class=\"reaction-count\" data-reaction-count=\"helpful\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\udca1 <\/span><span class=\"reaction-description font-medium\">Helpful <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"confused\"><span class=\"reaction-count\" data-reaction-count=\"confused\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude15 <\/span><span class=\"reaction-description font-medium\">Confused <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"disappointed\"><span class=\"reaction-count\" data-reaction-count=\"disappointed\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\ud83d\ude1e <\/span><span class=\"reaction-description font-medium\">Disappointed <\/span><\/button><button type=\"button\" aria-pressed=\"false\" class=\"reaction-btn flex flex-col items-center gap-1 text-sm text-gray-700 hover:text-primary-600 cursor-pointer transition-transform hover:scale-105\" data-reaction=\"inaccurate\"><span class=\"reaction-count\" data-reaction-count=\"inaccurate\">0<\/span><span class=\"reaction text-3xl\" aria-hidden=\"true\">\u274c <\/span><span class=\"reaction-description font-medium\">Inaccurate <\/span><\/button><\/div><div id=\"reaction-message\" class=\"hidden mt-8 rounded-md border border-primary-100 bg-white\/50 backdrop-blur-sm px-4 py-2 text-sm text-center shadow-sm\"><\/div><\/section><div class=\"calcdash-ad not-prose calcdash-ad--calc_result calcdash-ad--in-article\"><ins class=\"adsbygoogle\" style=\"display:block\" data-ad-client=\"ca-pub-1721569815777345\" data-ad-slot=\"6317458308\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\"><\/ins><script>(adsbygoogle = window.adsbygoogle || []).push({});<\/script><\/div>\n<style id=\"wpcoderpro-inline-1\">.formula-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section class=\"formula-box\" aria-labelledby=\"formula-title\">\r\n\t<div id=\"formula-title\" class=\"not-prose font-display mb-4\"><span class=\"icon icon-formula\" aria-hidden=\"true\"><\/span><h2>Chmod Formula<\/h2><\/div>\r\n\t<figure class=\"not-prose formula\">\r\n\t\t<figcaption class=\"formula-title\">Formula<\/figcaption>\r\n\t\t<div class=\"text-base text-gray-800\" id=\"formula\">\n\\[ d = 4 \\cdot r + 2 \\cdot w + 1 \\cdot x \\]\n\\[ \\text{mode} = (4 \\cdot s_{\\text{uid}} + 2 \\cdot s_{\\text{gid}} + 1 \\cdot s_{\\text{sticky}})\\,(d_{\\text{owner}})(d_{\\text{group}})(d_{\\text{others}}) \\]\n<\/div>\r\n\t<\/figure>\r\n\t<\/p>\n<p><strong>Where:<\/strong><\/p>\n<ul>\n<li>\\(r\\), \\(w\\), \\(x\\) \u2014 the read, write and execute bits, each 1 if the permission is granted and 0 if not;<\/li>\n<li>\\(d\\) \u2014 the octal digit for one class (owner, group or others), built from the 4\u20132\u20131 weights;<\/li>\n<li>\\(s_{\\text{uid}}\\), \\(s_{\\text{gid}}\\), \\(s_{\\text{sticky}}\\) \u2014 the setuid, setgid and sticky special bits (also 0 or 1).<\/li>\n<\/ul>\n<p>Each permission class gets one octal digit because read counts as 4, write as 2 and execute as 1; adding the granted values gives a number from 0 to 7. The optional leading digit encodes the special bits with the same 4\u20132\u20131 weights, so 4755 means setuid plus the familiar 755.<\/p>\n<p>\r\n<\/section>\n<style id=\"wpcoderpro-inline-459\">.calculation-box {\r\n\tborder-bottom: none !important;\r\n}<\/style><section id=\"calculation\" class=\"calculation-box\" aria-labelledby=\"calculation-title\">\r\n\t<div id=\"calculation-title\" class=\"not-prose font-display\"><span class=\"icon icon-unordered-list\" aria-hidden=\"true\"><\/span><h2>Chmod \u2013 Calculation Example<\/h2><\/div>\r\n\r\n<\/p>\n<p><strong>Example:<\/strong> a script that the owner may freely edit and run, the group and everyone else may only read and run \u2014 the classic 755 setup (this is also the calculator's default grid: owner r+w+x, group r+x, others r+x).<\/p>\n<p>\\[ d_{\\text{owner}} = 4 + 2 + 1 = 7 \\]<br \/>\n\\[ d_{\\text{group}} = 4 + 0 + 1 = 5 \\]<br \/>\n\\[ d_{\\text{others}} = 4 + 0 + 1 = 5 \\]<br \/>\n\\[ \\text{mode} = 755 \\]<\/p>\n<p><strong>Result:<\/strong> octal mode <strong>755<\/strong>, symbolic mode <strong>rwxr-xr-x<\/strong>, command <code>chmod 755 file<\/code>. In an <code>ls -l<\/code> listing the file appears as <code>-rwxr-xr-x<\/code>.<\/p>\n<p>\n\r\n<\/section>\n<h2>How to use the calculator<\/h2>\n<ol>\n<li>Open the <strong>Input method<\/strong> dropdown and pick how you want to describe the permissions: <em>Checkboxes (permission grid)<\/em>, <em>Octal code<\/em>, <em>Symbolic notation<\/em> or <em>Common presets<\/em>. Only the fields belonging to the chosen method stay visible.<\/li>\n<li>With <em>Checkboxes<\/em>, tick <strong>Read<\/strong>, <strong>Write<\/strong> and <strong>Execute<\/strong> for each class \u2014 Owner (u), Group (g) and Others (o) \u2014 and optionally the special bits <strong>Setuid<\/strong>, <strong>Setgid<\/strong> and <strong>Sticky<\/strong>.<\/li>\n<li>With <em>Octal code<\/em>, type three digits (e.g. 755) or four with a leading special digit (e.g. 4755). With <em>Symbolic notation<\/em>, enter nine characters such as rwxr-xr-x, or paste a full <code>ls -l<\/code> string like <code>-rwxr-xr-x<\/code> \u2014 the leading type character is stripped automatically. With <em>Common presets<\/em>, just select a ready-made permission set.<\/li>\n<li>Set <strong>File type<\/strong> to <em>Regular file (-)<\/em> or <em>Directory (d)<\/em> so the explanation and the <code>ls -l<\/code> preview use the right wording.<\/li>\n<li>Read the results: the <strong>numeric (octal) mode<\/strong>, the <strong>symbolic mode<\/strong>, ready-to-copy <strong>chmod commands<\/strong>, an <strong>ls -l style preview<\/strong>, a plain-English explanation and security notes.<\/li>\n<\/ol>\n<h2>What Linux file permissions are and how to read them<\/h2>\n<p>Every file and directory on a Linux system carries nine permission bits, divided into three classes: the <strong>owner<\/strong> (u) who created the file, the <strong>group<\/strong> (g) the file belongs to, and <strong>others<\/strong> (o) \u2014 everyone else on the machine. Within each class, three bits say whether the class may <strong>read<\/strong> (r), <strong>write<\/strong> (w) and <strong>execute<\/strong> (x) the file. The <code>chmod<\/code> command changes these bits, and the calculator translates any representation of them into all the others.<\/p>\n<p>The octal notation packs each class into one digit using the 4\u20132\u20131 weights, which is why you see modes like 644 or 755. The symbolic notation spells the same bits out as nine characters read left to right: owner triplet, group triplet, others triplet. A dash means the permission is missing, so <code>rw-r--r--<\/code> is the readable-but-not-executable 644. Both forms describe exactly the same bits \u2014 pick whichever the tool in front of you accepts.<\/p>\n<p>The meaning of the bits depends on the file type. For a regular file, r means view its contents, w means change them and x means run it as a program. For a directory, r means list the names inside, w means create, rename or delete entries inside, and x means enter it with <code>cd<\/code> and open the files within. That is why a directory needs x for its contents to be usable, and why 700 is the standard mode for private folders such as <code>~\/.ssh<\/code>.<\/p>\n<p>Three extra special bits round out the picture. <strong>Setuid<\/strong> (4) makes an executable run with its owner's privileges \u2014 the mechanism behind <code>\/usr\/bin\/passwd<\/code>. <strong>Setgid<\/strong> (2) does the same for the group, and on directories it makes new files inherit the directory's group. <strong>Sticky<\/strong> (1) restricts deletion in a shared writable directory so users can remove only their own files \u2014 the rule that keeps <code>\/tmp<\/code> (1777) safe. In symbolic output these appear as s\/S in an execute slot or t\/T in the final slot; the capital form indicates the execute bit underneath is off.<\/p>\n<h2>Common permission modes<\/h2>\n<table>\n<thead>\n<tr>\n<th>Mode<\/th>\n<th>Symbolic<\/th>\n<th>Typical use<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>600<\/td>\n<td>rw-------<\/td>\n<td>Private files such as SSH keys<\/td>\n<\/tr>\n<tr>\n<td>644<\/td>\n<td>rw-r--r--<\/td>\n<td>Ordinary files, web content<\/td>\n<\/tr>\n<tr>\n<td>700<\/td>\n<td>rwx------<\/td>\n<td>Private directories such as ~\/.ssh<\/td>\n<\/tr>\n<tr>\n<td>755<\/td>\n<td>rwxr-xr-x<\/td>\n<td>Programs, scripts, web-served files<\/td>\n<\/tr>\n<tr>\n<td>775<\/td>\n<td>rwxrwxr-x<\/td>\n<td>Shared directories for a trusted group<\/td>\n<\/tr>\n<tr>\n<td>1777<\/td>\n<td>rwxrwxrwt<\/td>\n<td>Shared scratch space like \/tmp<\/td>\n<\/tr>\n<tr>\n<td>4755<\/td>\n<td>rwsr-xr-x<\/td>\n<td>Setuid root executables (use sparingly)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Assumptions, limitations and practical tips<\/h2>\n<ul>\n<li><strong>777 is almost never the answer.<\/strong> Making a file world-writable opens it to every account on the system. Prefer 775 with a properly chosen group, or ACLs (<code>setfacl<\/code>), before reaching for 777.<\/li>\n<li><strong>Never combine world-writable with setuid or setgid.<\/strong> Modes like 4777 or 7777 let anyone replace the file while it still runs elevated \u2014 a classic privilege-escalation hole.<\/li>\n<li><strong>Others should not outdo the owner.<\/strong> If the third digit exceeds the first, you have almost certainly mistyped the mode; the security notes will flag it.<\/li>\n<li><strong>000 blocks everyone, including the owner.<\/strong> Only root can recover access, so use 600 or 700 instead when you want privacy.<\/li>\n<li><strong>Be careful with <code>chmod -R<\/code>.<\/strong> A recursive numeric mode overwrites all bits on every file and subdirectory at once; directories usually need x while data files should not have it. Apply modes per file type rather than blasting a whole tree.<\/li>\n<li><strong>Root ignores permission bits.<\/strong> Permissions constrain normal users; they are not a protection against root-level access.<\/li>\n<li>The calculator maps known permission representations onto each other, including special bits, but cannot account for ACLs, SELinux or other mandatory access controls that may also affect real-world access.<\/li>\n<\/ul>\n<p>If you work with other Linux-side encodings, you may also find the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/unix-timestamp-converter\/\">Unix timestamp converter<\/a>, the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/hex-converter\/\">hex converter<\/a> and the <a href=\"https:\/\/wpcalc.com\/en\/web-tools\/binary-calculator\/\">binary calculator<\/a> useful for understanding the underlying number systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert Linux file permissions between a clickable checkbox grid, octal code (e.g. 755) and symbolic notation (e.g. rwxr-xr-x). Get ready-to-use chmod commands, an ls -l preview and security notes for regular files and directories.<\/p>\n","protected":false},"author":3168,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[63],"tags":[64],"class_list":["post-67419","post","type-post","status-publish","format-standard","hentry","category-web-tools","tag-converter-tools"],"acf":[],"_links":{"self":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67419","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/users\/3168"}],"replies":[{"embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/comments?post=67419"}],"version-history":[{"count":1,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67419\/revisions"}],"predecessor-version":[{"id":67420,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/posts\/67419\/revisions\/67420"}],"wp:attachment":[{"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/media?parent=67419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/categories?post=67419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpcalc.com\/en\/wp-json\/wp\/v2\/tags?post=67419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}