<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[The Terminal Log]]></title><description><![CDATA[The Terminal Log]]></description><link>https://niyhi.hashnode.dev</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1593680282896/kNC7E8IR4.png</url><title>The Terminal Log</title><link>https://niyhi.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 08:03:12 GMT</lastBuildDate><atom:link href="https://niyhi.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to Read and Manage Linux File Permissions Using chmod]]></title><description><![CDATA[You just spent time writing an automation or deployment script. You try to execute it, and your terminal hits you with a familiar blocker:
bash: ./deploy.sh: Permission denied

Running sudo chmod 777 ]]></description><link>https://niyhi.hashnode.dev/how-to-read-and-manage-linux-file-permissions-using-chmod</link><guid isPermaLink="true">https://niyhi.hashnode.dev/how-to-read-and-manage-linux-file-permissions-using-chmod</guid><dc:creator><![CDATA[Qudus Olaniyi YUSUFF]]></dc:creator><pubDate>Sun, 31 May 2026 12:53:20 GMT</pubDate><content:encoded><![CDATA[<hr />
<p>You just spent time writing an automation or deployment script. You try to execute it, and your terminal hits you with a familiar blocker:</p>
<pre><code class="language-bash">bash: ./deploy.sh: Permission denied
</code></pre>
<p>Running <code>sudo chmod 777 deploy.sh</code> will bypass the error, but it creates a massive security hole by opening your file up to any user or process on the system.</p>
<p>Here is how to quickly read the Linux permission matrix and fix access issues safely.</p>
<h2>Prerequisites: Setting up Your Sandbox</h2>
<p>To practice managing system flags safely, create an isolated directory and an empty script file inside your terminal workspace:</p>
<pre><code class="language-bash">mkdir chmod-blog-post &amp;&amp; cd chmod-blog-post
touch deploy.sh
</code></pre>
<h2>Step 1: Read the Terminal Matrix (<code>ls -l</code>)</h2>
<p>Before changing any permissions, you need to audit the file's current state. Run the list command with the long-listing flag (<code>-l</code>):</p>
<pre><code class="language-bash">ls -l deploy.sh
</code></pre>
<p>Try executing the file right after to observe the default system restrictions:</p>
<pre><code class="language-bash">./deploy.sh
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/371e3b85-8122-45b2-b75f-8b85ddd492ec.png" alt="" style="display:block;margin:0 auto" />

<p>The 10 characters at the far left of the output (e.g., <code>-rw-rw-r--</code>) form a specific security matrix broken down into four distinct pieces:</p>
<ul>
<li><p><strong>Character 1:</strong> Denotes the type of file. A hyphen (<code>-</code>) indicates a standard file, while a <code>d</code> represents a directory.</p>
</li>
<li><p><strong>Characters 2–4 (</strong><code>rw-</code><strong>):</strong> Represents <strong>User/Owner</strong> permissions. The creator can read and write to this file, but cannot execute it.</p>
</li>
<li><p><strong>Characters 5–7 (</strong><code>rw-</code><strong>):</strong> Represents <strong>Group</strong> permissions. Members of the owner's group can read and write.</p>
</li>
<li><p><strong>Characters 8–10 (</strong><code>r--</code><strong>):</strong> Represents <strong>Others/World</strong> permissions. Anyone else on the machine or network can only read the file.</p>
</li>
</ul>
<h2>Step 2: Modifying via the Symbolic Method (<code>u+x</code>)</h2>
<p>The command used to change file access constraints is <code>chmod</code> (short for <strong>Change Mode</strong>). The quickest way to fix our permission issue is by using math symbols and target letters.</p>
<p>To resolve the execution failure, add (<code>+</code>) the execute (<code>x</code>) flag exclusively to the owner/user (<code>u</code>):</p>
<pre><code class="language-bash">chmod u+x deploy.sh
ls -l deploy.sh
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/3cbb2487-4e37-4a50-ab58-e96c4a3b1bfb.png" alt="" style="display:block;margin:0 auto" />

<p>Using this notation gives you highly descriptive control. For instance, if you want to revoke write access from the world, you pass <code>o-w</code>. It functions like basic terminal arithmetic.</p>
<h2>Step 3: Managing Security via Octal Notation (<code>600</code>)</h2>
<p>While symbols are useful for quick fixes, production DevOps infrastructure relies on absolute numbers (Octal Notation). Each basic permission maps to an explicit numeric value:</p>
<ul>
<li><p><strong>Read (</strong><code>r</code><strong>):</strong> 4</p>
</li>
<li><p><strong>Write (</strong><code>w</code><strong>):</strong> 2</p>
</li>
<li><p><strong>Execute (</strong><code>x</code><strong>):</strong> 1</p>
</li>
<li><p><strong>No Permission (</strong><code>-</code><strong>):</strong> 0</p>
</li>
</ul>
<p>To compute a setting, sum the numbers for each role (User, Group, World) independently.</p>
<p>For example, when dealing with sensitive files like cloud server SSH private keys (<code>id_rsa</code>), security compliance dictates that only the owner should access it. Let's create an example key file and give the owner Read (4) + Write (2) = <strong>6</strong>, while wiping out group and world access to <strong>0</strong>:</p>
<pre><code class="language-bash">touch id_rsa
chmod 600 id_rsa
ls -l id_rsa
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/39d290dd-30ea-43de-a9ef-8d6814579326.png" alt="" style="display:block;margin:0 auto" />

<p>The resulting <code>-rw-------</code> output shows that group and world access have been completely revoked. Now, only your specific user account can read or modify your private keys.</p>
<h2>Step 4: Configuring Production Web Permissions (<code>755</code>)</h2>
<p>What if you are configuring a web server or system application where everyone needs to read and execute the file, but only you should modify it?</p>
<p>Calculating the values:</p>
<ul>
<li><p><strong>User (Full Access):</strong> Read (4) + Write (2) + Execute (1) = <strong>7</strong></p>
</li>
<li><p><strong>Group (Read/Execute):</strong> Read (4) + Write (0) + Execute (1) = <strong>5</strong></p>
</li>
<li><p><strong>World (Read/Execute):</strong> Read (4) + Write (0) + Execute (1) = <strong>5</strong></p>
</li>
</ul>
<p>This gives us the classic industry-standard <strong>755</strong> configuration:</p>
<pre><code class="language-bash">chmod 755 deploy.sh
ls -l deploy.sh
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/ca5cba75-7913-4dfe-9565-2d6f5dc2aa19.png" alt="" style="display:block;margin:0 auto" />

<p>The script is now properly configured to run in production without creating unnecessary security vulnerabilities.</p>
<h2>Practical DevOps Cheatsheet</h2>
<p>Keep this reference guide bookmarked for your everyday deployment workflows:</p>
<table>
<thead>
<tr>
<th>Command</th>
<th>Numeric Mode</th>
<th>Operational Action</th>
<th>Common Production Use Case</th>
</tr>
</thead>
<tbody><tr>
<td><code>chmod u+x script.sh</code></td>
<td>N/A</td>
<td>Grants execution rights exclusively to the owner</td>
<td>Making a local automation script runnable</td>
</tr>
<tr>
<td><code>chmod 600 id_rsa</code></td>
<td>600</td>
<td>Locks file entirely to owner read/write only</td>
<td>Securing private SSH authentication keys</td>
</tr>
<tr>
<td><code>chmod 755 app.py</code></td>
<td>755</td>
<td>Full owner access; group/others can read/run</td>
<td>Public deployment binaries or web hooks</td>
</tr>
<tr>
<td><code>chmod 700 private_dir/</code></td>
<td>700</td>
<td>Restricts directories entirely to the owner</td>
<td>Securing system configuration folders</td>
</tr>
</tbody></table>
<h2>Conclusion</h2>
<p>Understanding <code>chmod</code> removes the guesswork from system debugging. By auditing permissions with <code>ls -l</code> and applying pinpoint modifications using symbolic or numeric modes, you can secure your environments efficiently without resorting to lazy security holes like <code>777</code>.</p>
]]></content:encoded></item><item><title><![CDATA[A Beginner's Guide to Git Branching and Merging in the Terminal]]></title><description><![CDATA[When developing a new feature, writing code directly on your primary branch risks breaking your working application. Git branches solve this by allowing you to isolate changes and test ideas without a]]></description><link>https://niyhi.hashnode.dev/a-beginner-s-guide-to-git-branching-and-merging-in-the-terminal</link><guid isPermaLink="true">https://niyhi.hashnode.dev/a-beginner-s-guide-to-git-branching-and-merging-in-the-terminal</guid><dc:creator><![CDATA[Qudus Olaniyi YUSUFF]]></dc:creator><pubDate>Sun, 31 May 2026 09:48:37 GMT</pubDate><content:encoded><![CDATA[<p>When developing a new feature, writing code directly on your primary branch risks breaking your working application. Git branches solve this by allowing you to isolate changes and test ideas without altering your production code.</p>
<p>This guide covers how to check, create, and merge local branches using the terminal.</p>
<h2>Prerequisites</h2>
<p>Git requires at least one commit in a repository before it can track or display branches. Run the following commands to create a project directory, initialize Git, and generate a root commit:</p>
<pre><code class="language-bash">mkdir git-blog-post &amp;&amp; cd git-blog-post
git init
git branch -m main
echo "Base project structure" &gt; README.md
git add .
git commit -m "Initial commit"
</code></pre>
<p>With an established commit history, you can now begin managing branches.</p>
<h2>Step 1: Check Your Active Branch</h2>
<p>Before running modifications, verify which branch you are currently working on. Run the following command:</p>
<pre><code class="language-bash">git branch
</code></pre>
<p>This command lists all local branches in the repository. The branch marked with an asterisk (<code>*</code>) is your active workspace.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/502b6f09-b271-46eb-8350-bfbedf6b647e.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 2: Create and Switch to a New Branch</h2>
<p>To isolate your new workflow, create a separate branch. Run this command to create a branch named <code>feature-test</code> and switch to it immediately:</p>
<pre><code class="language-bash">git checkout -b feature-test
</code></pre>
<p>The <code>-b</code> flag is an operational shortcut. It combines two separate steps: creating the new branch (<code>git branch feature-test</code>) and changing your active workspace to it (<code>git checkout feature-test</code>).</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/9881cb14-6bbb-45d2-a026-448c77292b61.png" alt="" style="display:block;margin:0 auto" />

<h2>Step 3: Stage and Commit Changes</h2>
<p>Create a file to simulate a project modification, stage it, and commit it to your active branch history:</p>
<pre><code class="language-bash">echo "This is a new feature test." &gt; sample.txt
git add sample.txt
git commit -m "Testing a new feature"
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/b079b6ac-0fab-4583-a8ae-f88531e1862d.png" alt="" style="display:block;margin:0 auto" />

<p>This commit is now recorded exclusively on the <code>feature-test</code> branch history. Your <code>main</code> branch remains unchanged.</p>
<h2>Step 4: Merge Changes Back to Main</h2>
<p>Once your feature changes are ready, integrate them back into your primary production branch. First, switch back to your main branch:</p>
<pre><code class="language-bash">git checkout main
</code></pre>
<p>Now, pull the history from <code>feature-test</code> into <code>main</code> using the merge command:</p>
<pre><code class="language-bash">git merge feature-test
</code></pre>
<img src="https://cdn.hashnode.com/uploads/covers/6a1bfae8f77c84962eb0d47e/e970d1e4-832c-47f1-8546-ad9838977778.png" alt="" style="display:block;margin:0 auto" />

<p>Because <code>main</code> had no conflicting changes, Git performs a fast-forward merge, directly updating the <code>main</code> branch pointer to match the latest commit from your feature branch.</p>
<h2>Conclusion</h2>
<p>Isolating your work in branches keeps your primary codebase stable and organizes your development history. With these four foundational commands, you can safely manage local development workflows directly from the terminal.</p>
]]></content:encoded></item></channel></rss>