{"id":1489,"date":"2016-07-01T17:15:42","date_gmt":"2016-07-01T14:15:42","guid":{"rendered":"http:\/\/www.systemcodegeeks.com\/?p=1489"},"modified":"2017-12-04T15:57:32","modified_gmt":"2017-12-04T13:57:32","slug":"linux-chmod-example","status":"publish","type":"post","link":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/","title":{"rendered":"Linux chmod Example"},"content":{"rendered":"<p>One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness with the permissions can lead to a security hole in the system.<\/p>\n<p>This example will show how are changed the permissions, a task for which <code>chmod<\/code> command is used<\/p>\n<p>For this example, Linux Mint 17.3 has been used.<\/p>\n<h2>1. Linux permission system<\/h2>\n<p>What makes the Linux permission system so great is its simplicity, specially when it&#8217;s compared to others, such us Windows&#8217;. In any case, we will see briefly how it works.<\/p>\n<p>There are three main things that have to be understood: the <strong>elements<\/strong> the permissions are defined for, the <strong>actions<\/strong> that can be performed, and <strong>who<\/strong> can perform them.<br \/>\n[ulp id=&#8217;SG9vnnKgRCD7iZxf&#8217;]<br \/>\n&nbsp;<br \/>\nThe elements are two:<\/p>\n<ul>\n<li>Files.<\/li>\n<li>Directories.<\/li>\n<\/ul>\n<p>The actions are three:<\/p>\n<ul>\n<li>Read<\/li>\n<li>Write.<\/li>\n<li>Execute. Apart from for executing scripts and binaries, also <strong>corresponds to folders<\/strong>: to create files and other folders inside it.<\/li>\n<\/ul>\n<p>And who can perform them, other three:<\/p>\n<ul>\n<li>The user that owns the file.<\/li>\n<li>The group that the user owning the file belongs to.<\/li>\n<li>Any other user that is not the owner and does not belong to the group the owner does.<\/li>\n<\/ul>\n<p>To see how the permissions are organized, we can list the files in the terminal:<\/p>\n<pre class=\"brush:bash\">ls -l<\/pre>\n<p>And we will see something similar to the following:<\/p>\n<pre class=\"brush:bash\">-rw-r--r-- 1 julen julen\u00a0\u00a0\u00a0\u00a0\u00a0 0 Jun 26 14:20 file.txt\r\ndrwxr-xr-x 2 julen julen\u00a0\u00a0 4096 Jun 26 14:22 folder<\/pre>\n<p>The first section, 10 characters, are which correspond to permissions. Let&#8217;s examine it:<\/p>\n<ul>\n<li>The first character is for file type. <code>-<\/code> means that the file is a regular file, and <code>d<\/code> means that is a directory.<\/li>\n<li>The following nine characters are for read (<code>r<\/code>), write (<code>w<\/code>) and execute (<code>x<\/code>) permissions for the owner, the group of the owner, and others, respectively.<\/li>\n<\/ul>\n<h2>2. Changing permissions<\/h2>\n<p>To change the permissions, the <code>chmod<\/code> command (contraction of <em>change<\/em> and <em>mode<\/em>) is used. The syntax is the following:<\/p>\n<pre class=\"brush:bash\">chmod permissions file [file 2] [file n]<\/pre>\n<p>The specification of the files seems quite obvious, but, how are the permissions specified?<\/p>\n<h3>2.1. Octal representation<\/h3>\n<p>One of the options is the octal notation.<\/p>\n<p>For example, for setting read and write permissions for the owner, read permissions for its group, and no permission for others, to a <code>file.txt<\/code> file, we would have to execute:<\/p>\n<pre class=\"brush:bash\">sudo chmod 640 file.txt<\/pre>\n<p>We can try to read the file with a user that is not the owner and does not belong the the owner&#8217;s group, to see what happens:<\/p>\n<pre class=\"brush:bash\">sudo -u other-user more file.txt<\/pre>\n<p>And we would receive an error message:<\/p>\n<pre class=\"brush:bash\">file.txt: Permission denied<\/pre>\n<p>But where comes that <code>640<\/code> from?<\/p>\n<p>Each digit of that number represents which permissions will have the owner, its group, and others. And each digit is the octal representation of the permission combination we want to assign. So:<\/p>\n<ul>\n<li><code>0<\/code> for no permission.<\/li>\n<li><code>1<\/code> is for execution permission.<\/li>\n<li><code>2<\/code> is for write permission.<\/li>\n<li><code>4<\/code> is for read permission.<\/li>\n<\/ul>\n<p>So, for assigning read and write permissions, what we have done is <code>2 + 4 = 6<\/code>.<\/p>\n<p>The following table shows the permissions that gives each digit:<\/p>\n<table>\n<thead>\n<tr>\n<th>Number<\/th>\n<th>Binary<\/th>\n<th>Read? (<code>r<\/code>)<\/th>\n<th>Write? (<code>w<\/code>)<\/th>\n<th>Execute? (<code>x<\/code>)<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>0<\/td>\n<th>000<\/th>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<th>001<\/th>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<th>010<\/th>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<th>011<\/th>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<th>100<\/th>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<th>101<\/th>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<th>110<\/th>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #ff0000;\">No<\/span><\/td>\n<\/tr>\n<tr>\n<td>7<\/td>\n<th>111<\/th>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<td><span style=\"color: #339966;\">Yes<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>2.2. Symbolic representation<\/h3>\n<p>Apart from octal representation, <code>chmod<\/code> also allows symbolic representation.<\/p>\n<p>In the symbolic representation letters and arithmetic operators are used:<\/p>\n<p>For the <strong>users<\/strong>, the symbols are the following:<\/p>\n<ul>\n<li><code>u<\/code>: file owner.<\/li>\n<li><code>g<\/code>: file owner&#8217;s group.<\/li>\n<li><code>o<\/code>: other users.<\/li>\n<li><code>a<\/code>: all users.<\/li>\n<\/ul>\n<p>The <strong>actions<\/strong> are represented with the same symbols that we have seen before:<\/p>\n<ul>\n<li><code>r<\/code>: read.<\/li>\n<li><code>w<\/code>: write.<\/li>\n<li><code>x<\/code>: execute.<\/li>\n<\/ul>\n<p>And the operators to set the permissions are:<\/p>\n<ul>\n<li><code>=<\/code>: sets the permissions as specified, overwriting any other previous permissions.<\/li>\n<li><code>+<\/code>: adds permissions.<\/li>\n<li><code>-<\/code>: removes permissions.<\/li>\n<\/ul>\n<p>The syntax for the symbolic representation is the following:<\/p>\n<pre class=\"brush:bash\">sudo chmod who operator action(s)[,who operator action(s),...]<\/pre>\n<p>For example, the previous example (owner: read and write; group: read; others: none) with the symbolic notation, would be the following:<\/p>\n<pre class=\"brush:bash\">sudo chmod u=rw,g=r,o-rwx file.txt<\/pre>\n<p>As you can see, for this example, this notation requires much more verbosity.<\/p>\n<p>But for other cases is more suitable. For example, if we want to maintain the current permissions, but allowing now everybody to write, we would have to type:<\/p>\n<pre class=\"brush:bash\">sudo chmod a+w file.txt<\/pre>\n<p>And the file would pass from these permissions:<\/p>\n<pre class=\"brush:bash\">-rw-r----- 1 julen julen 0 Jun 26 17:38 file.txt<\/pre>\n<p>To these ones:<\/p>\n<pre class=\"brush:bash\">-rw-rw--w- 1 julen julen 0 Jun 26 17:39 file.txt<\/pre>\n<h2>3. Special permissions<\/h2>\n<p>Apart from those permissions we have seen, there are three more special permissions in Linux: the <code>setuid<\/code> (user id), the <code>setgid<\/code> (group id), and the <code>sticky<\/code>.<\/p>\n<h3>3.1. setuid<\/h3>\n<p>The\u00a0<code>setuid<\/code> bit (set user ID) can be assigned to executable files, which is for, when a file is executed, allow the process acquire that file&#8217;s owner&#8217;s permissions. <strong>This is generally used to allow <em>normal<\/em> users (those without superuser privileges) to obtain root privileges for some executables<\/strong>.<\/p>\n<p>This can be seen, for example, in common binaries, such us <code>\/bin\/ping<\/code>. If we check its permissions, we will see that it has the <code>setuid<\/code> bit bit assigned:<\/p>\n<pre class=\"brush:bash\">-rwsr-xr-x 1 root root 44168 May\u00a0 7\u00a0 2014 \/bin\/ping*<\/pre>\n<p>Which is expressed with a <code>s<\/code>, in the place for the execution bit for the owner.<\/p>\n<p>If we remove the <code>setuid<\/code> bit from that executable:<\/p>\n<pre class=\"brush:bash\">sudo chmod u-s \/bin\/ping<\/pre>\n<p>A <em>normal<\/em> user won&#8217;t be able to use <code>ping<\/code>, and if it would try to use it:<\/p>\n<pre class=\"brush:bash\">ping localhost<\/pre>\n<p>The following message will be shown:<\/p>\n<pre class=\"brush:bash\">ping: icmp open socket: Operation not permitted<\/pre>\n<p>Of course, an user with <code>sudo<\/code> permissions could execute the command with root privileges, but, as said before, <strong>this bit is though for users that don&#8217;t have superuser privileges<\/strong>.<\/p>\n<p>To add the\u00a0<code>setuid<\/code> bit again:<\/p>\n<pre class=\"brush:bash\">sudo chmod u+s \/bin\/ping<\/pre>\n<h3>3.2. setgid<\/h3>\n<p>If the\u00a0<code>setuid<\/code> bit allows the user acquire the permissions of the owner, <strong>the <code>setgid<\/code> (set group id) allows to acquire the permissions of the group<\/strong>.<\/p>\n<p>The bit can be set as follows with the octal notation:<\/p>\n<pre class=\"brush:bash\">sudo chmod 2777 script.sh<\/pre>\n<p>Which is set with the <code>2<\/code>.<\/p>\n<p>And with symbolic notation:<\/p>\n<pre class=\"brush:bash\">sudo chmod g+s script.sh<\/pre>\n<p>If the\u00a0<code>setuid<\/code> bit was placed in the owner&#8217;s execution bit place, in this case, is placed in the group&#8217;s execution&#8217;s place:<\/p>\n<pre class=\"brush:bash\">-rwxrwsrwx\u00a0 1 julen julen\u00a0\u00a0\u00a0\u00a0 14 Jun 27 19:22 script.sh*<\/pre>\n<h3>3.3. sticky<\/h3>\n<p>The sticky bit is used in directories, when we want <strong>a file, or folder writable for several users, but where files and folders inside it can only be deleted by the owner<\/strong>. This bit is used, for example, in <code>\/tmp<\/code> and <code>\/var\/tmp<\/code> directories.<\/p>\n<p>The sticky bit can be assigned the following way:<\/p>\n<pre class=\"brush:bash\">sudo chmod 1777 sticky\/<\/pre>\n<p>Where the sticky bit is set with the leading <code>1<\/code>, and then, the wanted permissions (which usually are <code>777<\/code> for this cases).<\/p>\n<p>And, with symbolic notation:<\/p>\n<pre class=\"brush:bash\">sudo chmod +t sticky\/<\/pre>\n<p>The sticky bit is expressed with a <code>t<\/code> in the place for the execution bit for others:<\/p>\n<pre class=\"brush:bash\">drwxrwxrwt\u00a0 2 julen julen\u00a0\u00a0 4096 Jun 27 19:22 sticky\/<\/pre>\n<p>We can see how it works, we can create a file in our <code>sticky\/<\/code> directory, try to modify it with the owner and other user, and also to delete it:<\/p>\n<pre class=\"brush:bash\">touch file.txt\r\necho \"written with owner\" &gt; file.txt\r\nsudo -u other-user echo \"written with other user\" &gt; file.txt<\/pre>\n<p>Which would work. But if we try to delete it with the user that is not the owner&#8230;<\/p>\n<pre class=\"brush:bash\">sudo -u other-user rm file.txt<\/pre>\n<p>And we would see:<\/p>\n<pre class=\"brush:bash\">rm: remove write-protected regular file \u2018file.txt\u2019?<\/pre>\n<p>We can type <code>y<\/code> to confirm, but&#8230;<\/p>\n<pre class=\"brush:bash\">rm: cannot remove \u2018file.txt\u2019: Operation not permitted<\/pre>\n<p>But the owner of the file could delete it with no problem.<\/p>\n<p>To remove the sticky bit:<\/p>\n<pre class=\"brush:bash\">sudo chmod -t sticky\/<\/pre>\n<h2>4. Summary<\/h2>\n<p>In this example, we have first seen very briefly how the Linux permission, identifying the main concepts that are involved when dealing with permissions. Then, we have seen how the permissions are changed for the different notations, and, to end up with the example, we have taken a look for the special permissions bits that are available in Linux.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness with the permissions can lead to a security hole in the system. This example will show how are changed the permissions, a task for which chmod command is used For this example, &hellip;<\/p>\n","protected":false},"author":25,"featured_media":185,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[61,74],"class_list":["post-1489","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bash","tag-linux","tag-permissions"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linux chmod Example - System Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linux chmod Example - System Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\" \/>\n<meta property=\"og:site_name\" content=\"System Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/systemcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-01T14:15:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-12-04T13:57:32+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Toni\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@systemcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Toni\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\"},\"author\":{\"name\":\"Toni\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2\"},\"headline\":\"Linux chmod Example\",\"datePublished\":\"2016-07-01T14:15:42+00:00\",\"dateModified\":\"2017-12-04T13:57:32+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\"},\"wordCount\":1126,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"keywords\":[\"Linux\",\"permissions\"],\"articleSection\":[\"BASH\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\",\"name\":\"Linux chmod Example - System Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"datePublished\":\"2016-07-01T14:15:42+00:00\",\"dateModified\":\"2017-12-04T13:57:32+00:00\",\"description\":\"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness\",\"breadcrumb\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.systemcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Shell Scripting\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"BASH\",\"item\":\"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/bash\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Linux chmod Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#website\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"name\":\"System Code Geeks\",\"description\":\"Operating System Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.systemcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/systemcodegeeks\",\"https:\/\/x.com\/systemcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2\",\"name\":\"Toni\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g\",\"caption\":\"Toni\"},\"url\":\"https:\/\/www.systemcodegeeks.com\/author\/julen-pardo\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linux chmod Example - System Code Geeks - 2026","description":"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/","og_locale":"en_US","og_type":"article","og_title":"Linux chmod Example - System Code Geeks - 2026","og_description":"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness","og_url":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/","og_site_name":"System Code Geeks","article_publisher":"https:\/\/www.facebook.com\/systemcodegeeks","article_published_time":"2016-07-01T14:15:42+00:00","article_modified_time":"2017-12-04T13:57:32+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","type":"image\/jpeg"}],"author":"Toni","twitter_card":"summary_large_image","twitter_creator":"@systemcodegeeks","twitter_site":"@systemcodegeeks","twitter_misc":{"Written by":"Toni","Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#article","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/"},"author":{"name":"Toni","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2"},"headline":"Linux chmod Example","datePublished":"2016-07-01T14:15:42+00:00","dateModified":"2017-12-04T13:57:32+00:00","mainEntityOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/"},"wordCount":1126,"commentCount":0,"publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","keywords":["Linux","permissions"],"articleSection":["BASH"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/","url":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/","name":"Linux chmod Example - System Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.systemcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage"},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage"},"thumbnailUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","datePublished":"2016-07-01T14:15:42+00:00","dateModified":"2017-12-04T13:57:32+00:00","description":"One of the most critical jobs a system administrator has to continuously be dealing with is the permission administration. The most small carelessness","breadcrumb":{"@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#primaryimage","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2016\/01\/bash-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.systemcodegeeks.com\/shell-scripting\/bash\/linux-chmod-example\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.systemcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Shell Scripting","item":"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/"},{"@type":"ListItem","position":3,"name":"BASH","item":"https:\/\/www.systemcodegeeks.com\/category\/shell-scripting\/bash\/"},{"@type":"ListItem","position":4,"name":"Linux chmod Example"}]},{"@type":"WebSite","@id":"https:\/\/www.systemcodegeeks.com\/#website","url":"https:\/\/www.systemcodegeeks.com\/","name":"System Code Geeks","description":"Operating System Developers Resource Center","publisher":{"@id":"https:\/\/www.systemcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.systemcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.systemcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.systemcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.systemcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/systemcodegeeks","https:\/\/x.com\/systemcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/69a7de154310f99cedabb63c580291b2","name":"Toni","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.systemcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/21c1661474c78b4757355b8beef9ab1d14f490ee3a3e67392f4e618d36643d4c?s=96&d=mm&r=g","caption":"Toni"},"url":"https:\/\/www.systemcodegeeks.com\/author\/julen-pardo\/"}]}},"_links":{"self":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1489","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/users\/25"}],"replies":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/comments?post=1489"}],"version-history":[{"count":0,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/posts\/1489\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media\/185"}],"wp:attachment":[{"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/media?parent=1489"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/categories?post=1489"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.systemcodegeeks.com\/wp-json\/wp\/v2\/tags?post=1489"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}