<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Yash Prajapati on Medium]]></title>
        <description><![CDATA[Stories by Yash Prajapati on Medium]]></description>
        <link>https://medium.com/@yashprajapati121204?source=rss-353ae9249673------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*P2AVqCSaXwzII8kU</url>
            <title>Stories by Yash Prajapati on Medium</title>
            <link>https://medium.com/@yashprajapati121204?source=rss-353ae9249673------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 10:09:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yashprajapati121204/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beyond r-w-x : Mastering Linux special Permissions ( SUID, SGID and the Sticky Bit )]]></title>
            <link>https://medium.com/@yashprajapati121204/beyond-r-w-x-mastering-linux-special-permissions-suid-sgid-and-the-sticky-bit-5c1cf5887ce8?source=rss-353ae9249673------2</link>
            <guid isPermaLink="false">https://medium.com/p/5c1cf5887ce8</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[permission]]></category>
            <dc:creator><![CDATA[Yash Prajapati]]></dc:creator>
            <pubDate>Sat, 05 Dec 2026 15:59:45 GMT</pubDate>
            <atom:updated>2026-12-05T15:59:45.559Z</atom:updated>
            <content:encoded><![CDATA[<p>Most Linux user stops learning file permission once they understand rwx ( read , write , execute) and basics chmod 755 command. However Linux has a fourth , often-overlooked tier of permission known as special permission bits: SUID , SGID and Sticky Bit.</p><p>Have you ever wandered how linux can manage permission just by read, write , execute . However there are certain scenarios when using this permissions are not enough. Lets talk a little bit about them.</p><p>First Let me describe some details about the permission that we are going to talk about:</p><p>user:group:other<br>rwx:rwx:rwx</p><p><em>SUID </em>: octal value: 4, symbolic flag: s ( in user slot ) , applies to: Executable files , core-purpose: Runs the file with the file owner’s privileges.</p><p>( rws:rwx:rwx )</p><p><em>GUID </em>: octal value: 2, symbolic flag: s ( in group slot ) , applies to: files &amp; directory , core-purpose: Runs file as group owner , or forces new files in a folder to inherit the folder’s group .</p><p>( rwx:rws:rwx )</p><p><em>Sticky Bit </em>: octal value: 1, symbolic flag: t( in other slot) , applies to: Directories, core-purpose: Prevents users from deleting files they do not own inside a shared directory.</p><p>( rwx:rwx:rwt )</p><p>Note: If you see a capital S or T in ls -l . It means the special bit is set , but the underlying execute ( x ) permission is missing — rendering in ineffective</p><h3>Scenario: 1 Changing a user password.</h3><p>Normally, when you run a program , it executes with permissions owned by you. SUID overrides this , when an executable has the SUID bit set, it runs with the file’s owner instead of the person running it.</p><p>Real World Example:</p><p>The /usr/bin/passwd command . Every user needs to change their password , which requires writing to /etc/shadow ( a file only <strong>root</strong> can modify ). Because /usr/bin/passwd is owned by root and has SUID enabled , running it temporarily gives you root privileges strictly for that command.</p><p>How to spot it : Look for an s instead of an x in the owner’s execute position</p><p>rwsr-xr-x 1 root root 343213 Mar 20 10:00 /usr/bin/passwd</p><p>chmod u+s filename</p><p>chmod 4755 filename</p><h3>Scenario: 2 Shared Permission</h3><p>By default , when you create a file inside a shared folder, the file is owned by your primary group — meaning teammates might not be able to edit it. When SGID is set on a directory, every new file or subfolder created inside it automatically inherits the directory’s group ownership.</p><p>Real World example:</p><p>A shared project folder /var/www/project owned by the developers group. With SGID enabled. TM-1 and TM-2 can both create files there, and the group owners stays developers instead switching to TM-1 or TM-2 primary groups.</p><p>How to spot it : Look for an s in the group’s execute position</p><p>chmod g+s directory_name<br>chmod 2775 directory_name</p><h3>Scenario: 3 Shared Permission Safety</h3><p>Imagine a shared folder where everyone needs write access to create files- like /tmp . If everyone has write (w) permission on a directory, anyone can delete or rename any file inside it, even file created by someone else.</p><p>The sticky bit solves this. When applied to a directory, users can still create and modify their own files, but only the file’s owner, the directory’s owner , or root can delete or rename a file.</p><p>Real world Example: The /tmp directory on every linux system. All users and services need to drop temporary files there, so permission are wide open 777 , but the sticky bits stops user A from deleting user B’s temporary files.</p><p>How to spot it: Look for a t in the “others” execute position:</p><p>drwxrwxrwt 14 root rooot 4096 Dec 5 18.00 /tmp</p><p>How to set it <br>chmod +t directory_name<br>chmodd 1777 directory_name</p><p>Summary Cheet Sheet</p><p>Need a normal user to run specific tool as root? Use SUID ( 4) <br>Need a team folder where all new files belong to the same group? User SGID ( 2 )</p><p>Need a public dropbox folder where users can’t delete each other’s work ? Use the sticky bit ( 1 )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KpAiS38PfmyDVKJevKiomQ.jpeg" /><figcaption>Fig:1 Special Permission</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5c1cf5887ce8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How www.netflix.com gets resolved ? ( L-1 DNS Resolution )]]></title>
            <link>https://medium.com/@yashprajapati121204/how-www-netflix-com-gets-resolved-l-1-dns-resolution-233913a5514c?source=rss-353ae9249673------2</link>
            <guid isPermaLink="false">https://medium.com/p/233913a5514c</guid>
            <category><![CDATA[ip]]></category>
            <category><![CDATA[dns-servers]]></category>
            <category><![CDATA[browsers]]></category>
            <category><![CDATA[servers]]></category>
            <dc:creator><![CDATA[Yash Prajapati]]></dc:creator>
            <pubDate>Thu, 03 Dec 2026 09:32:27 GMT</pubDate>
            <atom:updated>2026-12-03T09:32:27.577Z</atom:updated>
            <content:encoded><![CDATA[<p>DNS is not just about Resolving DOMAIN to IP , a lot happens in between.</p><p>Ever wandered what actually happens when you type <a href="https://www.netflix.com/">https://www.netflix.com</a> in you browser.</p><p>Its not magic, Its DNS!</p><p>Lets learn the concept behind DNS architecture by taking Netflix.com as an example. <br>First Your browser let’s say Chrome , You opened it and type simply Netflix.com . The moment you entered the query your device’s OS ( operation system) gets a request to resolve netflix.com .</p><p>The OS further checks the cache ( once a domain is resolved it will remain stored for a certain period of time subject to same name request ) . If it is found in cache the IP would get returned back to chrome and it request the resource directly from the Netflix authorized server.</p><p>But what if it does not ?</p><p>If the answer isn’t cached, the OS queries a configured resolver (ISP, Google DNS, Cloudflare, etc.). <br>Once the default resolver gets the query , it progresses the query to DNS hierarchy.</p><p>Right from this moment 3 Important hops is taken to resolve the domain.</p><ol><li>ROOT DNS SERVER (.) <br>The Starting point of the DNS hierarchy . <br>It knows where to find the nameservers responsible for TLD ( Top Level Domain ) such as .com, .org, .in . <br>It does NOT know NETFLIX’s<strong> IP address.</strong></li><li>TLD DNS SERVER (.com) <br>For Netflix.com , it is .com server. <br>It knows Which authoritative nameservers are responsible for domains under .com. <br>It does NOT normally provide Netflix’s final IP address.</li><li>AUTHORITATIVE DNS SERVER<br>Holds the DNS records for the server. <br>it can return A, AAAA, CNAME and other DNS records depending on the query .</li></ol><p>Once the query reached the Authoritative server , it returns back the IP address of the matched Domain name record to the recursive resolver and thus get’s back to Chrome browser . <br>This entire lifecycle manages a Domain to get resolved to its IP address in order to reach an authoritative server .</p><p>So whenever you would be asked that what is DNS, you can explain the DNS is not just an IP resolution for a name but a complete hierarchy followed that hops down to resolve an IP to initiate a connect between client and server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVyRr9xM9D-fL3hkcdGY3w.png" /><figcaption>figure 1: DNS Hierarchy architecute</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*hcElx9bzlBLmSc5Lrscy1A.png" /><figcaption>figure 2: Authoritative server anatomy</figcaption></figure><p>There are mainly 2 ways to resolve a domain which are as follows:</p><p>a) <strong>Iterative Resolution:</strong> The DNS resolver asks each server, and each server responds with the best information it has, usually a referral to another nameserver.</p><p>b) <strong>Recursive resolution: </strong>The client asks the recursive resolver to obtain the final answer on its behalf. The resolver takes responsibility for following the DNS hierarchy and returns the result.</p><p>In standard DNS:</p><ul><li>Your machine makes a recursive query to the resolver.</li><li>The resolver makes iterative queries to root, TLD and authoritative servers.</li><li>The resolver returns the final answer to your machine.</li></ul><p>The example that we have taken uses the standard DNS resolution architecture , which combines both type of resolution.</p><ol><li>Client =&gt; Recursive DNS resolver<br>Recursive query<br>Your browser/OS asks the DNS resolver: “Give me the IP address of www.netflix.com.&quot; The client expects the resolver to return the final answer. It doesn’t want to contact multiple DNS servers itself.</li><li><strong>Recursive Resolver → DNS hierarchy<br></strong>Iterative queries<br>The resolver independently contacts:<br>Root DNS Server → Where is the .com TLD?<br>.com TLD Server → Where is Netflix&#39;s authoritative DNS?<br>Authoritative DNS Server → Here is the requested DNS record.</li></ol><p>The resolver collects the answer and returns it to the client.</p><p><strong>Additional Information</strong></p><p>There are in total 13 Root server clusters world wide.</p><p>DNS A record : Maps hostname to IPv4</p><p>AAAA record : Maps hostname to IPv6</p><p>CNAME : Maps one hostname to another</p><p>NS record : Identifies authoritative nameservers</p><p>TTL : Controls DNS caching duration</p><p>Route 53 : AWS managed DNS</p><p>CoreDNS : DNS service inside Kubernetes</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=233913a5514c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kubernetes Pod Networking: what happens behind the scenes.]]></title>
            <link>https://medium.com/@yashprajapati121204/kubernetes-pod-networking-what-happens-behind-the-scenes-f80d909ef11f?source=rss-353ae9249673------2</link>
            <guid isPermaLink="false">https://medium.com/p/f80d909ef11f</guid>
            <category><![CDATA[veth-pairs]]></category>
            <category><![CDATA[linux-network-mechanism]]></category>
            <category><![CDATA[pod-networking]]></category>
            <category><![CDATA[cni]]></category>
            <dc:creator><![CDATA[Yash Prajapati]]></dc:creator>
            <pubDate>Sun, 22 Nov 2026 12:40:03 GMT</pubDate>
            <atom:updated>2026-11-22T12:40:03.234Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*aVw2U_HB_BxL2QKDdPKSHw.png" /></figure><p>I’m sure being a DevOps engineer , most of us would have used kubernetes as a container orchestration technology .</p><p>With <strong>Pod </strong>being the smallest deployable unit inside a kubernetes cluster.</p><p>Have you ever wondered that,</p><p><strong>How does the pod get its own network interface?</strong></p><p><strong>How does it communicate with other pods or nodes inside a cluster or outside it ?</strong></p><p>To understand this let’s explore 4 important concepts.</p><ul><li><strong>Network Namespace</strong></li><li><strong>Eth0</strong></li><li><strong>Veth Pairs</strong></li><li><strong>CNI ( Container Network Interface )</strong></li></ul><p><strong>1. Network Namespaces: Giving a Pod Its Own Network Environment</strong></p><p>Linux provides a feature called <strong>network namespace</strong> that allows processes to have isolated <strong>networking environments</strong>.</p><p>Think of 2 pods running on the same worker node. Each pods have it’s own:</p><ul><li><strong>Network Interface</strong></li><li><strong>IP address</strong></li><li><strong>Routing Table</strong></li><li><strong>Network-related Configurations</strong></li></ul><p>With this level of isolation , changes to one namespace does not have effect on the other namespaces.</p><p>In K8s, containers belonging to the same Pod share a network namespace. That’s why containers inside a Pod can communicate with each other using <strong>localhost ( loopback interface ).</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jzMdW14NIB3LCrezbSL-_Q.png" /><figcaption><em>Figure 1: Two isolated network namespaces with separate networking environments.</em></figcaption></figure><p><strong>One important distinction:</strong> A Kubernetes namespace and a Linux network namespace are two different things. One organizes Kubernetes resources; the other isolates networking at the Linux kernel level.</p><p><strong>2. Understanding eth0: The Pod’s Network Interface</strong></p><p>When you enter a Linux environment, you might see an interface named eth0.</p><p>A Kubernetes Pod commonly has an interface with the same name.</p><p>You can inspect it using: kubectl exec &lt;pod-name&gt; — ip addr show eth0</p><p>This interface provides the Pod with its network connectivity and IP address. <br>You may notice that multiple pods will have the same interface named eth0 subject to an isolated environment .</p><p><strong>3. Veth Pair: Connecting the Pod to the Host</strong></p><p>A network namespace provides isolation , but isolation alone doesn’t provide connectivity. <br>So how does a Pod <strong>communicate </strong>with the networking environment of its worker node ?</p><p>One commonly used Linux mechanism is <strong>veth pairs ( Virtual Ethernet Pairs ).</strong></p><p>A veth pair consists of two virtual Ethernet interfaces connected to each other , almost like the two ends of a virtual cable.</p><ul><li>One end is placed inside the Pod’s network namespace, commonly named eth0.</li><li>The other end remains in the host’s network namespace, often with a name such as vethXXXX.</li></ul><p>When a packet is transmitted through one end, it appears at the other end.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NL0NQyhBDOEtSIVOsnQeFQ.png" /><figcaption><em>Figure 2: A veth pair connecting a Pod’s network namespace to the host network.</em></figcaption></figure><p>This is the common networking arrangement , although not every kubernetes networking environment implementation uses the exact same architecture.</p><p><strong>4. CNI: Who Configures the Networking?</strong></p><p>We now understand that a Pod needs a network namespace, an interface and network configuration.</p><p>But who sets all of this up?</p><p>This is where <strong>Container Network Interface (CNI)</strong> comes in.</p><p>CNI is a specification that defines how container runtimes interact with networking plugins.</p><p>In a typical Linux Kubernetes setup, the runtime invokes a CNI plugin to configure the Pod’s networking.</p><p>Depending on the plugin, this can include:</p><ul><li>Creating and configuring network interfaces.</li><li>Assigning an IP address.</li><li>Configuring routes.</li><li>Connecting the Pod to the cluster network.</li></ul><p>Some popular networking implementations include Calico, Flannel, Cilium and Amazon VPC CNI.</p><p>They don’t all implement networking in the same way, but they help provide the connectivity Kubernetes workloads need.</p><p><strong>5. Putting Everything Together</strong></p><p>Let’s connect the concepts.</p><p>When a Pod is created:</p><p>1. A network namespace provides an <strong>isolated networking environment</strong>.</p><p>2. An interface such as <strong>eth0</strong> is configured inside it.</p><p>3. A networking implementation may use a <strong>veth pair</strong> to connect the Pod to the host.</p><p>4. The <strong>CNI plugin</strong> configures the networking required by that implementation.</p><p>5. The Pod becomes part of the <strong>cluster network</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PapDWEHQpvIItfRZRWGhfA.png" /><figcaption><em>Figure 3: A simplified view of how Pod networking components fit together.</em></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_jCjo3ooNrWJ3WgBMi5bnw.png" /><figcaption><em>Figure 4: CNI architecture</em> overview</figcaption></figure><h3>What’s Next?</h3><p>We now understand how a Pod gets connected to the network.</p><p>But what happens when an application inside that Pod sends a packet?</p><p>In the next blog, we’ll follow a packet and understand how it travels through Linux networking.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f80d909ef11f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[2021 Meta Outage Case Study]]></title>
            <link>https://medium.com/@yashprajapati121204/2021-meta-outage-case-study-4224b39a657b?source=rss-353ae9249673------2</link>
            <guid isPermaLink="false">https://medium.com/p/4224b39a657b</guid>
            <category><![CDATA[facebook]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[bgp-protocol]]></category>
            <category><![CDATA[dns-servers]]></category>
            <category><![CDATA[request-flow]]></category>
            <dc:creator><![CDATA[Yash Prajapati]]></dc:creator>
            <pubDate>Thu, 22 Oct 2026 12:46:51 GMT</pubDate>
            <atom:updated>2026-10-22T12:46:51.225Z</atom:updated>
            <content:encoded><![CDATA[<p>What if the internet suddenly lost the path to reach Facebook.com?</p><h3>Overview</h3><p>Something related to this happened back in 2021, when the internet and the Meta network became unreachable. The DNS servers were also unavailable to resolve <strong>Facebook.com</strong>.</p><p>The reason was a simple routine maintenance network backbone health check that caused a <strong>catastrophic </strong>event bringing the entire service down for around 5 hours.</p><p>This incident teaches an important lesson: a <strong>service </strong>does not need to <strong>crash </strong>to become <strong>unavailable</strong>. The loss of the <strong>mechanisms </strong>that allow systems to <strong>discover</strong>, <strong>route </strong>to, or <strong>recover </strong>other systems can be enough to create a <strong>major outage.</strong></p><h3>Effect</h3><p>At that time, Facebook was itself considered the internet because it had a vast number of users: approximately <strong>2.5 billion-plus </strong>users across Facebook, Instagram, and WhatsApp.</p><p><strong>What Facebook Provides</strong></p><p>● A community that connects people world wide.</p><p>● Smaller and big business advertisement platform.</p><p>● Authentication as a third party.</p><p>So if Facebook went down , It not only affects a medium for communication but a critical financial loss to businesses all over world. The offices that used facebooks as an authentication service could not use them and thus major complication in IAM at organizational level. So meta is not just a social media community but a direct business impact platform. Henceforth anyone who is on meta platform was unable to do anything what it offers to do. [Payments, communication , authentication , global reach.]</p><h3>Technicality</h3><p>Now, let us take a deep dive into some technical aspects of this outage.</p><p>i) AS: Autonomous System Each organization has its own massive network, such as an ISP. This network is used to communicate with other networks.</p><p>ii) Border Gateway Protocol (BGP) : We can consider BGP as a postal service for the internet. It helps every request reach its destination by selecting the best or most appropriate path. The network terminology involved here includes data that determines how a router should route traffic. Each network uses BGP announcements based on:</p><p>● IP ranges</p><p>● Policy domains</p><p>● Other routing policies</p><p><strong>Client Request: </strong>Facebook.com</p><p>1. The client sends a request to Facebook.com.</p><p>2. The ISP does not know where Facebook.com is located until the domain is resolved to its IP address.</p><p>3. BGP helps determine the path to Facebook’s IP address.</p><p>4. The request is routed through the appropriate network path.</p><p><strong>BGP Announcement</strong></p><p>Networks constantly advertise the path to their network. For example: If you want to reach Facebook, I am the best path. The best route is selected from the advertised routing table. The routing table and the commands involved in routing can be affected during an outage. Therefore, during a maintenance check, if a global routing issue is not properly identified, the entire global backbone infrastructure may be affected.</p><h3>The BGP and DNS Server Collapse</h3><p>The audit tool that assessed the outage had an ongoing bug, which allowed the problem to traverse over all the global connection to the network.</p><p>When the DNS server lost connection to the data centres, the BGP server stopped advertising the BGP route to the internet. As a result, the IP routes were no longer properly available. This affected connectivity and caused communication with the outside world to collapse.</p><p><strong>Own’s Network Dependency</strong></p><p>Meta had built a strong and automated infrastructure in which the tools were designed to communicate through the network. Since the network backbone was down, the organisation was unable to continue its work. There was no way to continue because the tools heavily depended on the network. The engineers had to go to the physical data centres to resolve the issue.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*WcZB6WiPAIlhVFnmyFN71Q.png" /><figcaption>Fig:1 overview to request flow</figcaption></figure><h3><strong>Outage Impact</strong></h3><p>● Within a minute or two, there was a large shift in users to other platforms.</p><p>● Users started moving to alternative platforms because of the outage.</p><p>● This caused a huge traffic spike on alternative platforms such as Twitter. ● Facebook lost a major portion of its customers, causing a huge revenue impact.</p><p>● There was also a global market impact.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4224b39a657b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>