<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: DailyDev</title>
    <description>The latest articles on DEV Community by DailyDev (@dailydev_326337b7650dfa4d).</description>
    <link>https://dev.to/dailydev_326337b7650dfa4d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3702900%2F7ad4cd54-2df9-4fda-9c17-67ea9b2c4d46.png</url>
      <title>DEV Community: DailyDev</title>
      <link>https://dev.to/dailydev_326337b7650dfa4d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dailydev_326337b7650dfa4d"/>
    <language>en</language>
    <item>
      <title>Mastering Linux File Permissions: The 4-2-1 Rule Explained</title>
      <dc:creator>DailyDev</dc:creator>
      <pubDate>Sun, 18 Jan 2026 08:47:12 +0000</pubDate>
      <link>https://dev.to/dailydev_326337b7650dfa4d/mastering-linux-file-permissions-the-4-2-1-rule-explained-5f9g</link>
      <guid>https://dev.to/dailydev_326337b7650dfa4d/mastering-linux-file-permissions-the-4-2-1-rule-explained-5f9g</guid>
      <description>&lt;p&gt;Have you ever blindly typed &lt;code&gt;chmod 777&lt;/code&gt; just to get a script to run, secretly hoping you didn't just open a security hole? We’ve all been there.&lt;/p&gt;

&lt;p&gt;Linux file permissions can feel like cryptic math equations. You see strings like &lt;code&gt;drwxr-xr-x&lt;/code&gt; or numbers like &lt;code&gt;755&lt;/code&gt;, and it’s easy to get lost.&lt;/p&gt;

&lt;p&gt;In this guide, I’ll break down exactly how these permissions work, what the "4-2-1" rule means, and give you a &lt;strong&gt;free visual tool&lt;/strong&gt; to calculate them instantly without the mental math.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;1. Anatomy of a Permission String&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When you run &lt;code&gt;ls -l&lt;/code&gt; in your terminal, you see something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nt"&gt;-rwxr-xr--&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This string isn't random. It is split into three distinct groups:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The Owner (User):&lt;/strong&gt; The person who created the file.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Group:&lt;/strong&gt; Other users in the file's assigned group.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Public (Others):&lt;/strong&gt; Everyone else on the system.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The first character (often &lt;code&gt;-&lt;/code&gt; or &lt;code&gt;d&lt;/code&gt;) just tells you if it's a file or a directory. The next 9 characters define the permissions for these three groups.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;2. The "4-2-1" Magic Numbers&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is where the math comes in. Computers read permissions as binary, but we use an &lt;strong&gt;Octal (base-8)&lt;/strong&gt; system to make it human-readable.&lt;/p&gt;

&lt;p&gt;Each permission type has a numeric value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Read (r) = 4&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Write (w) = 2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Execute (x) = 1&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Permission (-) = 0&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To get the permission number for a specific group, you simply &lt;strong&gt;sum&lt;/strong&gt; these numbers.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Example Calculation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want the &lt;strong&gt;Owner&lt;/strong&gt; to have full Read, Write, and Execute access:&lt;br&gt;
&lt;code&gt;4 (Read) + 2 (Write) + 1 (Execute) = 7&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;If you want the &lt;strong&gt;Group&lt;/strong&gt; to only have Read and Execute (no editing):&lt;br&gt;
&lt;code&gt;4 (Read) + 0 (No Write) + 1 (Execute) = 5&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;3. Common Permission Codes Decoded&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Now that you know the math, here are the three most common configurations you'll use as a developer:&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;chmod 755 (Ideal for Scripts/Directories)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Owner (7):&lt;/strong&gt; Can Read, Write, and Execute (4+2+1).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group (5):&lt;/strong&gt; Can Read and Execute (4+0+1).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public (5):&lt;/strong&gt; Can Read and Execute (4+0+1).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Use case:&lt;/em&gt; Web folders or executable scripts where you want others to run them but not change them.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;chmod 644 (Ideal for Config Files)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Owner (6):&lt;/strong&gt; Read and Write (4+2). No Execute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Group (4):&lt;/strong&gt; Read only (4).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Public (4):&lt;/strong&gt; Read only (4).&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Use case:&lt;/em&gt; Standard text files like &lt;code&gt;.html&lt;/code&gt; or &lt;code&gt;.env&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;chmod 777 (The Danger Zone)&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Everyone (777):&lt;/strong&gt; Everyone can read, write, edit, and delete the file.&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Use case:&lt;/em&gt; almost never. Only use this for temporary testing, then immediately restrict it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;4. Cheat Sheet: The Visual Chmod Calculator&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Memorizing &lt;code&gt;4+2+1&lt;/code&gt; is great, but sometimes you just want to click a few checkboxes and get the right code, or check what permissions &lt;code&gt;664&lt;/code&gt; actually grants.&lt;/p&gt;

&lt;p&gt;I built a free tool to help visualize this. It’s a &lt;strong&gt;Chmod Calculator&lt;/strong&gt; that lets you toggle permissions visually and see the resulting Linux command instantly.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(Note: You can use a screenshot of your actual tool here)&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Interactive Grid:&lt;/strong&gt; Toggle Read/Write/Execute boxes.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reverse Lookup:&lt;/strong&gt; Type "755" and see exactly what permissions it grants.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure:&lt;/strong&gt; Runs 100% in your browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;👉 &lt;strong&gt;Try the tool here:&lt;/strong&gt; &lt;strong&gt;&lt;a href="https://dailydev.in/tool/chmod-calculator" rel="noopener noreferrer"&gt;DailyDev Chmod Calculator&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Summary&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Linux permissions are your first line of defense in server security. Remember:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Read = 4&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Write = 2&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Execute = 1&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you ever forget the math, bookmark the &lt;strong&gt;&lt;a href="https://dailydev.in/tool/chmod-calculator" rel="noopener noreferrer"&gt;Chmod Calculator&lt;/a&gt;&lt;/strong&gt; to double-check before you deploy.&lt;/p&gt;

&lt;p&gt;Happy coding! 🚀&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Tags: #linux #devops #webdev #security #beginners&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
      <category>webdev</category>
      <category>security</category>
    </item>
    <item>
      <title>Building AI Agents from Scratch: A Complete Guide (2026)</title>
      <dc:creator>DailyDev</dc:creator>
      <pubDate>Fri, 09 Jan 2026 16:33:20 +0000</pubDate>
      <link>https://dev.to/dailydev_326337b7650dfa4d/building-ai-agents-from-scratch-a-complete-guide-2026-534i</link>
      <guid>https://dev.to/dailydev_326337b7650dfa4d/building-ai-agents-from-scratch-a-complete-guide-2026-534i</guid>
      <description>&lt;p&gt;Learn to build autonomous AI agents with LangChain. Complete guide with working Python code, architecture patterns, production deployment, and real-world case studies.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://blog.dailydev.in/p/building-ai-agents-from-scratch-a" rel="noopener noreferrer"&gt;Guide Link&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  💬 Let's Connect
&lt;/h2&gt;

&lt;p&gt;Building something with AI agents? I'd love to hear about it!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐦 Twitter: &lt;a href="https://x.com/dailydevdotin" rel="noopener noreferrer"&gt;@dailydevdotin&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;💼 LinkedIn: &lt;a href="https://www.linkedin.com/company/dailydev-in/" rel="noopener noreferrer"&gt;DailyDev.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;🌐 Website: &lt;a href="https://dailydev.in" rel="noopener noreferrer"&gt;dailydev.in&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;⭐ GitHub: &lt;a href="https://github.com/DailyDevDotIn/AI-Agent-Tutorial" rel="noopener noreferrer"&gt;Star the repo&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📬 Subscribe to get it first: &lt;a href="https://blog.dailydev.in" rel="noopener noreferrer"&gt;https://blog.dailydev.in&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
