{"id":15044,"date":"2026-01-20T12:40:00","date_gmt":"2026-01-20T12:40:00","guid":{"rendered":"https:\/\/www.ssdnodes.com\/?p=15044"},"modified":"2026-01-22T13:11:34","modified_gmt":"2026-01-22T13:11:34","slug":"chown-vs-chmod-linux-file-ownership-and-permissions","status":"publish","type":"post","link":"https:\/\/www.ssdnodes.com\/blog\/chown-vs-chmod-linux-file-ownership-and-permissions\/","title":{"rendered":"chown vs chmod: Understanding Linux File Ownership and Permissions"},"content":{"rendered":"<p>Imagine you just deployed a web application to your <a href=\"https:\/\/www.ssdnodes.com\/business-vps\/\">business VPS<\/a>, but when visitors try to access it, they get permission errors.<\/p>\n<p>Or maybe you're working with a development team where everyone needs different levels of access to the same project files. Sound familiar? These scenarios highlight exactly why understanding the difference between <code>chown<\/code> and <code>chmod<\/code> matters in real-world Linux administration.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15046\" style=\"border-radius: 25px;\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/chown-vs-chmod.webp\" alt=\"chown vs chmod\" width=\"600\" height=\"400\" \/><\/p>\n<blockquote><p><strong>Note:<\/strong> Want an easy way to calculate Linux permissions? Check out our handy <a href=\"https:\/\/www.ssdnodes.com\/chmod-calculator\/\">Chmod Calculator<\/a>.<\/p><\/blockquote>\n<h2>What's the Difference Between chown and chmod?<\/h2>\n<p>The fundamental difference is simple: <strong><code>chmod<\/code> controls what actions can be performed on a file<\/strong> (read, write, execute), while <strong><code>chown<\/code> controls who owns the file<\/strong> (which user and group). Think of <code>chmod<\/code> as setting the rules of engagement, and <code>chown<\/code> as deciding who gets to play by those rules in the first place.<\/p>\n<p>When you run <code>chmod 755 script.sh<\/code>, you're defining <a href=\"https:\/\/en.wikipedia.org\/wiki\/File-system_permissions\" target=\"_blank\" rel=\"noopener\">permissions<\/a>\u2014the owner can read, write, and execute, while others can only read and execute.<\/p>\n<p>When you run <code>chown alice:developers script.sh<\/code>, you're changing ownership\u2014now Alice owns the file and it belongs to the developers group, but the permissions (755) remain unchanged.<\/p>\n<p>These commands work together to create Linux's two-layer security model: ownership determines identity, permissions determine capability. You'll use <code>chmod<\/code> when you need to restrict or expand what people can do with a file. You'll use <code>chown<\/code> when you need to transfer responsibility for a file to a different user or group.<\/p>\n<h2>What Does chmod Stand For?<\/h2>\n<p>The <code>chmod<\/code> command stands for \"change mode\" where \"mode\" refers to the permission settings of a file or directory. The name comes from the early days of Unix, when file permissions were simply called the \"mode\" of a file. When you execute <code>chmod<\/code>, you're literally changing the access mode that determines who can read, write, or execute that file.<\/p>\n<h2>What is chmod and How Does It Work?<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15047\" style=\"border-radius: 25px;\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/what-is-chmod.webp\" alt=\"what is chmod\" width=\"600\" height=\"400\" \/><\/p>\n<p>The <code>chmod<\/code> command modifies file permissions using either symbolic notation (letters like <code>rwx<\/code>) or numeric notation (numbers like <code>755<\/code>). It operates on three permission levels (owner, group, and others) and controls three types of access: read (r\/4), write (w\/2), and execute (x\/1).<\/p>\n<p>Here's how <code>chmod<\/code> works in practice:<\/p>\n<pre><code class=\"language-bash\"># Give everyone read and execute permissions\r\n$ chmod 755 deploy.sh\r\n\r\n# Make a file readable and writable only by owner\r\n$ chmod 600 config.yml\r\n\r\n# Add execute permission for owner\r\n$ chmod u+x script.sh\r\n\r\n# Remove write permission from group and others\r\n$ chmod go-w shared-file.txt\r\n<\/code><\/pre>\n<p>The numeric method adds up permission values: read (4) + write (2) + execute (1) = 7 for full permissions. The symbolic method uses letters (u for user\/owner, g for group, o for others) combined with operators (+ to add, - to remove, = to set exactly).<\/p>\n<p>For a complete breakdown of permission numbers like 755, 644, and 700, check out our <a href=\"https:\/\/www.ssdnodes.com\/blog\/linux-permissions-chmod-755-644-drwxrxrx-explained\/\">detailed guide to Linux file permissions<\/a>, which covers everything from basic symbolic notation to advanced permission patterns.<\/p>\n<h2>What Does chown Do?<\/h2>\n<p>The <code>chown<\/code> command changes file ownership, specifically, it modifies which user and\/or group owns a particular file or directory. Every file in Linux has both a user owner and a group owner, and <code>chown<\/code> lets you change either or both of these ownership attributes.<\/p>\n<p>When you change ownership with <code>chown<\/code>, the permissions set by <code>chmod<\/code> don't change, only the identity of who those permissions apply to changes. This is crucial for understanding how the two commands complement each other rather than overlap.<\/p>\n<h2>What is chown and When Do You Need It?<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15048\" style=\"border-radius: 25px;\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/chown-command-in-linux.webp\" alt=\"chown command in linux\" width=\"600\" height=\"400\" \/><\/p>\n<p>The <code>chown<\/code> command (short for \"change owner\") transfers file ownership from one user or group to another. You need <code>chown<\/code> in several common scenarios: when files need to belong to a different user after deployment, when setting up shared directories for team collaboration, when configuring web server files to be owned by the web server user, or when fixing ownership issues after copying files between systems.<\/p>\n<p>Here are practical examples of <code>chown<\/code> in action:<\/p>\n<pre><code class=\"language-bash\"># Change owner to alice\r\n$ chown alice project-file.txt\r\n\r\n# Change both owner and group\r\n$ chown alice:developers project-file.txt\r\n\r\n# Change only the group\r\n$ chown :developers project-file.txt\r\n\r\n# Change ownership recursively for entire directory\r\n$ chown -R www-data:www-data \/var\/www\/html\r\n<\/code><\/pre>\n<p>The syntax follows a simple pattern: <code>chown [user]:[group] [file]<\/code>. You can change just the user, just the group (using <code>:group<\/code>), or both at once. The <code>-R<\/code> flag applies changes recursively to all files and subdirectories, which is essential when managing directory trees.<\/p>\n<h2>Understanding the chown Command in Linux<\/h2>\n<p>The <code>chown<\/code> command is your primary tool for managing file ownership in Linux environments. It's particularly critical in multi-user systems where different people or processes need ownership of different files. Unlike <code>chmod<\/code>, which anyone can use to modify their own files' permissions (within limits), <code>chown<\/code> typically requires superuser privileges because changing file ownership has significant security implications.<\/p>\n<h3>The Syntax of chown<\/h3>\n<p>The basic <code>chown<\/code> syntax follows this pattern:<\/p>\n<pre><code class=\"language-bash\">chown [OPTIONS] [USER][:GROUP] FILE\r\n<\/code><\/pre>\n<p>Let's break down the components:<\/p>\n<p><strong>User specification<\/strong>: You can specify a username or numeric user ID (UID). For example, <code>chown 1000 file.txt<\/code> and <code>chown john file.txt<\/code> both work if user john has UID 1000.<\/p>\n<p><strong>Group specification<\/strong>: After a colon or period, add the group name or numeric group ID (GID). Both <code>chown :developers file.txt<\/code> and <code>chown .developers file.txt<\/code> change the group ownership.<\/p>\n<p><strong>Combined syntax<\/strong>: The most common pattern is <code>user:group<\/code>, which changes both simultaneously: <code>chown alice:team project.conf<\/code>.<\/p>\n<p><strong>Shorthand options<\/strong>: Using <code>chown alice: file.txt<\/code> (with a trailing colon but no group name) changes the file's group to Alice's login group.<\/p>\n<h3>Common chown Options<\/h3>\n<p>The <code>chown<\/code> command supports several useful flags that modify its behavior:<\/p>\n<p><strong>Recursive operation<\/strong> (<code>-R<\/code>): Applies ownership changes to directories and all their contents. This is essential when managing web directories or project folders:<\/p>\n<pre><code class=\"language-bash\"># Change ownership of entire web directory\r\n$ sudo chown -R www-data:www-data \/var\/www\/myapp\r\n<\/code><\/pre>\n<p><strong>Preserve root<\/strong> (<code>--preserve-root<\/code>): Prevents accidentally changing ownership of the root directory <code>\/<\/code>, which could break your entire system. Modern versions of <code>chown<\/code> enable this by default.<\/p>\n<p><strong>Verbose output<\/strong> (<code>-v<\/code>): Reports every file that gets modified, useful for debugging or confirming changes:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -Rv alice:developers \/home\/shared\/\r\nchanged ownership of '\/home\/shared\/file1.txt' from root:root to alice:developers\r\nchanged ownership of '\/home\/shared\/file2.txt' from root:root to alice:developers\r\n<\/code><\/pre>\n<p><strong>Reference file<\/strong> (<code>--reference<\/code>): Copies ownership from one file to another, matching both user and group:<\/p>\n<pre><code class=\"language-bash\"># Make file2.txt have the same ownership as file1.txt\r\n$ chown --reference=file1.txt file2.txt\r\n<\/code><\/pre>\n<p><strong>Dereference<\/strong> (<code>-h<\/code>): By default, if you run <code>chown<\/code> on a symbolic link, it changes the ownership of the target file. Use <code>-h<\/code> to change the symlink itself instead.<\/p>\n<h2>Change Ownership of Files in Linux: Practical Examples<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15049\" style=\"border-radius: 25px;\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/change-ownership-of-file-linux.webp\" alt=\"change ownership of file linux\" width=\"600\" height=\"400\" \/><\/p>\n<p>Let's walk through real-world scenarios where you need to change file ownership on a Linux system. These examples reflect situations you'll encounter regularly when managing servers, especially in development environments.<\/p>\n<h3>Scenario 1: Deploying a Web Application<\/h3>\n<p>After you upload files to your VPS via SFTP or git, they're typically owned by your user account. But your web server (nginx or Apache) runs as a different user, usually <code>www-data<\/code> on Ubuntu\/Debian or <code>nginx<\/code>\/<code>apache<\/code> on other distributions. The web server needs to own these files to serve them properly:<\/p>\n<pre><code class=\"language-bash\"># Transfer ownership to web server user\r\n$ sudo chown -R www-data:www-data \/var\/www\/html\/myapp\r\n\r\n# Verify the change\r\n$ ls -l \/var\/www\/html\/myapp\r\ndrwxr-xr-x 3 www-data www-data 4096 Dec 26 10:00 public\r\n-rw-r--r-- 1 www-data www-data 2048 Dec 26 10:00 index.php\r\n<\/code><\/pre>\n<p>This ensures the web server can read your application files and, if needed, write to specific directories like uploads or cache folders.<\/p>\n<h3>Scenario 2: Team Development on Shared VPS<\/h3>\n<p>When multiple developers work on the same <a href=\"https:\/\/www.ssdnodes.com\/blog\/best-vps-hosting-for-developers\/\">VPS for development<\/a>, you need shared directories where everyone can contribute. Here's how to set this up properly:<\/p>\n<pre><code class=\"language-bash\"># Create a shared project directory\r\n$ sudo mkdir \/var\/projects\/teamapp\r\n\r\n# Change ownership to a shared group\r\n$ sudo chown -R :developers \/var\/projects\/teamapp\r\n\r\n# Verify group ownership\r\n$ ls -ld \/var\/projects\/teamapp\r\ndrwxrwxr-x 2 root developers 4096 Dec 26 10:15 \/var\/projects\/teamapp\r\n<\/code><\/pre>\n<p>Now any user in the <code>developers<\/code> group can work with these files. You'd typically combine this with <code>chmod g+w<\/code> to ensure group members can write to the directory, but the ownership change via <code>chown<\/code> is what grants them membership-based access in the first place.<\/p>\n<h3>Scenario 3: Fixing Ownership After File Transfers<\/h3>\n<p>When you copy files from one user's directory to another, or when you extract archives, ownership often doesn't match your needs:<\/p>\n<pre><code class=\"language-bash\"># Files extracted from backup owned by wrong user\r\n$ ls -l backup\/\r\n-rw-r--r-- 1 olduser olduser 5120 Nov 10 08:00 database.sql\r\n-rw-r--r-- 1 olduser olduser 2048 Nov 10 08:00 config.php\r\n\r\n# Fix ownership to current user\r\n$ sudo chown -R alice:alice backup\/\r\n\r\n# Verify the fix\r\n$ ls -l backup\/\r\n-rw-r--r-- 1 alice alice 5120 Nov 10 08:00 database.sql\r\n-rw-r--r-- 1 alice alice 2048 Nov 10 08:00 config.php\r\n<\/code><\/pre>\n<p>This is particularly common when migrating projects between servers or restoring from backups where the original user accounts no longer exist.<\/p>\n<h3>Scenario 4: Database File Ownership<\/h3>\n<p>Database servers like MySQL or PostgreSQL need to own their data directories. If you've moved database files or restored from backup, you might need to fix ownership:<\/p>\n<pre><code class=\"language-bash\"># MySQL data directory ownership\r\n$ sudo chown -R mysql:mysql \/var\/lib\/mysql\r\n\r\n# PostgreSQL data directory\r\n$ sudo chown -R postgres:postgres \/var\/lib\/postgresql\/14\/main\r\n<\/code><\/pre>\n<p>Without correct ownership, the database server can't start or access its data files, leading to service failures.<\/p>\n<h2>Change Owner of Directory Linux: The Recursive Approach<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15050\" style=\"border-radius: 25px;\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/change-owner-of-directory-linux.webp\" alt=\"change owner of directory linux\" width=\"600\" height=\"400\" \/><\/p>\n<p>Directories present unique challenges because they typically contain many files and subdirectories. When you need to change ownership of an entire directory tree, the <code>-R<\/code> (recursive) flag becomes essential.<\/p>\n<h3>Using chown -R for Directory Trees<\/h3>\n<p>The recursive flag tells <code>chown<\/code> to descend into directories and change ownership of everything it finds:<\/p>\n<pre><code class=\"language-bash\"># Change ownership of directory and all contents\r\n$ sudo chown -R username:groupname \/path\/to\/directory<\/code><\/pre>\n<p>This single command replaces what would otherwise require changing ownership on potentially thousands of individual files. For a project directory with 500 files across multiple subdirectories, <code>chown -R<\/code> handles everything in one operation.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15051\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/chown-r-recursive-command.webp\" alt=\"chown -r recursive command\" width=\"700\" height=\"601\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/chown-r-recursive-command.webp 700w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/chown-r-recursive-command-300x258.webp 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<h3>Real-World Directory Ownership Example<\/h3>\n<p>Consider setting up a shared project directory on a development VPS where your team collaborates:<\/p>\n<pre><code class=\"language-bash\"># Create the project structure\r\n$ sudo mkdir -p \/var\/projects\/webapp\/{src,tests,config,logs}\r\n\r\n# Set ownership to project lead with developer group\r\n$ sudo chown -R alice:developers \/var\/projects\/webapp\r\n\r\n# Verify the recursive change worked\r\n$ ls -lR \/var\/projects\/webapp\r\n\/var\/projects\/webapp:\r\ndrwxr-xr-x 2 alice developers 4096 Dec 26 10:30 config\r\ndrwxr-xr-x 2 alice developers 4096 Dec 26 10:30 logs\r\ndrwxr-xr-x 2 alice developers 4096 Dec 26 10:30 src\r\ndrwxr-xr-x 2 alice developers 4096 Dec 26 10:30 tests\r\n<\/code><\/pre>\n<p>Every subdirectory and any future files created inherit appropriate ownership patterns, though you'll want to combine this with proper <code>chmod<\/code> settings and potentially <code>setgid<\/code> bits to ensure new files get correct group ownership automatically.<\/p>\n<h3>Important Note: When NOT to Use Recursive chown<\/h3>\n<p>Be cautious with recursive ownership changes on system directories. Running <code>sudo chown -R username \/<\/code> would try to change ownership of your entire filesystem, breaking system files and potentially making your system unbootable. Always specify the exact path you intend to modify:<\/p>\n<pre><code class=\"language-bash\"># DANGEROUS - Don't do this\r\n$ sudo chown -R alice \/\r\n\r\n# SAFE - Specific path\r\n$ sudo chown -R alice \/home\/alice\/projects\r\n<\/code><\/pre>\n<p>Modern <code>chown<\/code> versions include <code>--preserve-root<\/code> by default to prevent the first scenario, but it's still worth understanding the risk.<\/p>\n<h2>Unix chown Command: Understanding the Relationship with chmod<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15052\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/unix-chown-command-with-chmod.webp\" alt=\"unix chown command with chmod\" width=\"700\" height=\"481\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/unix-chown-command-with-chmod.webp 700w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/unix-chown-command-with-chmod-300x206.webp 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>While <code>chown<\/code> and <code>chmod<\/code> are separate commands, they work together to create Linux's comprehensive security model. Understanding when to use each\u2014and when to use both\u2014separates effective system administration from constant permission headaches.<\/p>\n<h3>The Two-Layer Security Model<\/h3>\n<p>Linux file security operates on two distinct layers:<\/p>\n<p><strong>Layer 1: Ownership (chown)<\/strong>: Establishes identity (who owns the file and which group it belongs to). This is the \"who\" of file access.<\/p>\n<p><strong>Layer 2: Permissions (chmod)<\/strong>: Defines capabilities (what the owner, group members, and others can do with the file). This is the \"what\" of file access.<\/p>\n<p>You can't skip either layer. A file might have perfect permissions (chmod 644), but if it's owned by the wrong user (needs chown), those permissions apply to the wrong person. Conversely, a file might be owned by the right user, but without appropriate permissions set via chmod, that user still can't access it properly.<\/p>\n<h3>Combining chown and chmod for Complete Control<\/h3>\n<p>Most real-world scenarios require both commands working in tandem. Here's a complete example of setting up a web application directory:<\/p>\n<pre><code class=\"language-bash\"># Start with a fresh directory\r\n$ sudo mkdir \/var\/www\/myapp\r\n\r\n# Step 1: Set ownership to web server user\r\n$ sudo chown -R www-data:www-data \/var\/www\/myapp\r\n\r\n# Step 2: Set directory permissions (755)\r\n$ sudo find \/var\/www\/myapp -type d -exec chmod 755 {} \\;\r\n\r\n# Step 3: Set file permissions (644)\r\n$ sudo find \/var\/www\/myapp -type f -exec chmod 644 {} \\;\r\n\r\n# Step 4: Make specific directories writable for uploads\/cache\r\n$ sudo chmod 775 \/var\/www\/myapp\/storage\r\n$ sudo chmod 775 \/var\/www\/myapp\/cache\r\n\r\n# Verify the complete setup\r\n$ ls -la \/var\/www\/myapp\r\ndrwxr-xr-x 5 www-data www-data 4096 Dec 26 11:00 .\r\ndrwxr-xr-x 3 root     root     4096 Dec 26 10:45 ..\r\n-rw-r--r-- 1 www-data www-data 2048 Dec 26 11:00 index.php\r\ndrwxrwxr-x 2 www-data www-data 4096 Dec 26 11:00 storage\r\n<\/code><\/pre>\n<p>This workflow demonstrates the relationship: <code>chown<\/code> establishes that www-data owns everything, then <code>chmod<\/code> defines what www-data (and others) can actually do with those files.<\/p>\n<h3>Common Permission and Ownership Patterns<\/h3>\n<p>Certain combinations of <code>chown<\/code> and <code>chmod<\/code> appear repeatedly in Linux administration:<\/p>\n<p><strong>Web server files<\/strong>:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -R www-data:www-data \/var\/www\/html\r\n$ sudo chmod -R 755 \/var\/www\/html\r\n# Owner (www-data) has full control, others can read\/execute\r\n<\/code><\/pre>\n<p><strong>SSH private keys<\/strong>:<\/p>\n<pre><code class=\"language-bash\">$ chown username:username ~\/.ssh\/id_rsa\r\n$ chmod 600 ~\/.ssh\/id_rsa\r\n# Only owner can read\/write, everyone else blocked completely\r\n<\/code><\/pre>\n<p><strong>Shared development directory<\/strong>:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -R :developers \/var\/projects\/shared\r\n$ sudo chmod -R 775 \/var\/projects\/shared\r\n# Group has write access, others can read\r\n<\/code><\/pre>\n<p><strong>Log files<\/strong>:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown syslog:adm \/var\/log\/application.log\r\n$ sudo chmod 640 \/var\/log\/application.log\r\n# Owner can write logs, group can read them, others blocked\r\n<\/code><\/pre>\n<p>Each pattern serves a specific security purpose. The <code>chown<\/code> portion identifies who's involved, the <code>chmod<\/code> portion defines the access rules.<\/p>\n<h2>chown vs chmod: When to Use Each Command<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-15053\" src=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/what-does-chown-do-vs-chmod.webp\" alt=\"what does chown do vs chmod\" width=\"700\" height=\"583\" srcset=\"https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/what-does-chown-do-vs-chmod.webp 700w, https:\/\/www.ssdnodes.com\/wp-content\/uploads\/2025\/12\/what-does-chown-do-vs-chmod-300x250.webp 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/p>\n<p>Knowing which command solves which problem is crucial for efficient Linux administration. Here's how to decide between <code>chown<\/code> and <code>chmod<\/code> based on the situation you're facing.<\/p>\n<h3>Use chmod When You Need to Control Access Levels<\/h3>\n<p>Reach for <code>chmod<\/code> when the question is \"what can people do with this file?\" You're not changing who owns it, you're changing what's allowed:<\/p>\n<p><strong>Scenario<\/strong>: You have a script that shouldn't be executable by random users.<br \/>\n<strong>Solution<\/strong>: <code>chmod 644 script.sh<\/code> (removes execute permission for everyone)<\/p>\n<p><strong>Scenario<\/strong>: A configuration file contains sensitive credentials.<br \/>\n<strong>Solution<\/strong>: <code>chmod 600 config.ini<\/code> (only owner can read\/write)<\/p>\n<p><strong>Scenario<\/strong>: A shared directory needs to allow group members to create files.<br \/>\n<strong>Solution<\/strong>: <code>chmod 775 \/shared\/projects<\/code> (adds write permission for group)<\/p>\n<p><strong>Scenario<\/strong>: You've created a new shell script that needs to run.<br \/>\n<strong>Solution<\/strong>: <code>chmod +x deploy.sh<\/code> (adds execute permission)<\/p>\n<p>The common thread: you're modifying capabilities, not identities.<\/p>\n<h3>Use chown When You Need to Transfer Ownership<\/h3>\n<p>Reach for <code>chown<\/code> when the question is \"who should own this file?\" The permissions might be perfect, but they're assigned to the wrong user or group:<\/p>\n<p><strong>Scenario<\/strong>: Files uploaded via SFTP are owned by your user account, but the web server needs to own them.<br \/>\n<strong>Solution<\/strong>: <code>sudo chown -R www-data:www-data \/var\/www\/html\/uploads<\/code><\/p>\n<p><strong>Scenario<\/strong>: A developer leaves the team and their project files need new ownership.<br \/>\n<strong>Solution<\/strong>: <code>sudo chown -R newlead:developers \/var\/projects\/legacy-app<\/code><\/p>\n<p><strong>Scenario<\/strong>: Database files were restored from backup with wrong ownership.<br \/>\n<strong>Solution<\/strong>: <code>sudo chown -R mysql:mysql \/var\/lib\/mysql<\/code><\/p>\n<p><strong>Scenario<\/strong>: You're setting up a collaborative directory for a specific team.<br \/>\n<strong>Solution<\/strong>: <code>sudo chown -R :engineering \/var\/projects\/api-v2<\/code><\/p>\n<p>The common thread: you're changing who's responsible for the file, not what they can do with it.<\/p>\n<h3>Use Both When Setting Up New Services<\/h3>\n<p>Most service configurations require both commands working together. When you deploy a new application to a <a href=\"https:\/\/www.ssdnodes.com\/\">VPS server<\/a>, you'll typically need to:<\/p>\n<ol>\n<li>Set ownership to the appropriate user\/group (<code>chown<\/code>)<\/li>\n<li>Set permissions for security and functionality (<code>chmod<\/code>)<\/li>\n<\/ol>\n<p>Here's a complete Rails application deployment example:<\/p>\n<pre><code class=\"language-bash\"># Deploy the application\r\n$ git clone https:\/\/github.com\/example\/rails-app.git \/var\/www\/rails-app\r\n\r\n# Set ownership to app user\r\n$ sudo chown -R rails:rails \/var\/www\/rails-app\r\n\r\n# Set secure defaults for files and directories\r\n$ sudo find \/var\/www\/rails-app -type d -exec chmod 755 {} \\;\r\n$ sudo find \/var\/www\/rails-app -type f -exec chmod 644 {} \\;\r\n\r\n# Make scripts executable\r\n$ sudo chmod +x \/var\/www\/rails-app\/bin\/*\r\n\r\n# Secure credentials\r\n$ sudo chmod 600 \/var\/www\/rails-app\/config\/database.yml\r\n$ sudo chmod 600 \/var\/www\/rails-app\/config\/master.key\r\n\r\n# Allow application to write to specific directories\r\n$ sudo chmod 775 \/var\/www\/rails-app\/tmp\r\n$ sudo chmod 775 \/var\/www\/rails-app\/log\r\n$ sudo chmod 775 \/var\/www\/rails-app\/public\/uploads\r\n<\/code><\/pre>\n<p>This combination ensures the application owns its files (<code>chown<\/code>), has appropriate access levels (<code>chmod<\/code> for most files), and can write where needed (additional <code>chmod<\/code> on specific directories).<\/p>\n<h2>Practical chown and chmod Scenarios for Development Teams<\/h2>\n<p>Development teams working on shared VPS infrastructure face unique permission challenges. Getting the ownership and permission balance right prevents the \"it works on my machine\" problem from becoming \"nobody can access our files.\"<\/p>\n<h3>Multi-User Development Environment Setup<\/h3>\n<p>When multiple developers share a VPS for collaborative projects, you need ownership and permissions that enable cooperation without creating security holes:<\/p>\n<pre><code class=\"language-bash\"># Create a shared group for the team\r\n$ sudo groupadd webdev\r\n\r\n# Add team members to the group\r\n$ sudo usermod -a -G webdev alice\r\n$ sudo usermod -a -G webdev bob\r\n$ sudo usermod -a -G webdev charlie\r\n\r\n# Create project directory with group ownership\r\n$ sudo mkdir \/var\/projects\/company-site\r\n$ sudo chown -R :webdev \/var\/projects\/company-site\r\n\r\n# Set permissions for collaborative work\r\n$ sudo chmod -R 775 \/var\/projects\/company-site\r\n\r\n# Set setgid bit so new files inherit group ownership\r\n$ sudo chmod g+s \/var\/projects\/company-site\r\n<\/code><\/pre>\n<p>The <code>setgid<\/code> bit (set group ID) is crucial here\u2014it ensures that when Alice creates a file in this directory, it automatically belongs to the <code>webdev<\/code> group rather than her personal group. This prevents the common issue where one developer's files are inaccessible to teammates.<\/p>\n<h3>Handling File Uploads and User-Generated Content<\/h3>\n<p>Web applications that accept file uploads need careful ownership and permission configuration. The web server must be able to write uploaded files, but you don't want to give it write access to your entire application:<\/p>\n<pre><code class=\"language-bash\"># Application owned by deployment user\r\n$ sudo chown -R deploy:deploy \/var\/www\/webapp\r\n\r\n# Upload directory owned by web server with group sticky bit\r\n$ sudo chown -R www-data:deploy \/var\/www\/webapp\/public\/uploads\r\n$ sudo chmod 2775 \/var\/www\/webapp\/public\/uploads\r\n\r\n# Verify the setup\r\n$ ls -ld \/var\/www\/webapp\/public\/uploads\r\ndrwxrwsr-x 2 www-data deploy 4096 Dec 26 11:30 \/var\/www\/webapp\/public\/uploads\r\n<\/code><\/pre>\n<p>The <code>2775<\/code> permission includes the setgid bit (the \"2\" prefix), which means uploaded files will be accessible to both the web server user (www-data) and deployment users in the deploy group.<\/p>\n<h3>Managing Deployment Permissions<\/h3>\n<p>Automated deployment systems need specific ownership patterns to work correctly. Here's a typical CI\/CD setup where a deployment user manages application files:<\/p>\n<pre><code class=\"language-bash\"># Create deployment user\r\n$ sudo useradd -m -s \/bin\/bash deploy\r\n$ sudo usermod -a -G www-data deploy\r\n\r\n# Set up application ownership\r\n$ sudo chown -R deploy:www-data \/var\/www\/production-app\r\n\r\n# Directories need group write for deployment\r\n$ sudo find \/var\/www\/production-app -type d -exec chmod 775 {} \\;\r\n\r\n# Files should be group readable but not writable\r\n$ sudo find \/var\/www\/production-app -type f -exec chmod 664 {} \\;\r\n\r\n# Except uploaded content which web server owns\r\n$ sudo chown -R www-data:www-data \/var\/www\/production-app\/storage\/uploads\r\n$ sudo chmod -R 755 \/var\/www\/production-app\/storage\/uploads\r\n<\/code><\/pre>\n<p>This structure lets the deployment user update application code while the web server can read files and write to designated upload areas.<\/p>\n<h3>Temporary Permission Escalation<\/h3>\n<p>Sometimes developers need temporary elevated permissions for specific tasks. Rather than constantly using <code>sudo<\/code>, you can grant ownership temporarily:<\/p>\n<pre><code class=\"language-bash\"># Developer needs to debug production logs\r\n$ sudo chown alice:alice \/var\/log\/webapp\/production.log\r\n$ sudo chmod 600 \/var\/log\/webapp\/production.log\r\n\r\n# Alice can now read logs directly\r\n$ tail -f \/var\/log\/webapp\/production.log\r\n\r\n# When finished, restore proper ownership\r\n$ sudo chown syslog:adm \/var\/log\/webapp\/production.log\r\n$ sudo chmod 640 \/var\/log\/webapp\/production.log\r\n<\/code><\/pre>\n<p>This is safer than opening permissions globally, as it limits elevated access to specific files for specific timeframes.<\/p>\n<h2>Common chown and chmod Mistakes to Avoid<\/h2>\n<p>Even experienced administrators make permission mistakes that can create security vulnerabilities or break applications. Here are the most common pitfalls and how to avoid them.<\/p>\n<h3>Mistake 1: Using chmod 777 as a Quick Fix<\/h3>\n<p>When something doesn't work, the temptation is strong to just run <code>chmod 777<\/code> and move on. Don't do this. It grants full read, write, and execute permissions to everyone on the system:<\/p>\n<pre><code class=\"language-bash\"># DANGEROUS - Never do this\r\n$ chmod 777 \/var\/www\/html\r\n$ chmod -R 777 \/var\/www\/application\r\n<\/code><\/pre>\n<p>This creates massive security holes. Anyone with access to your system can modify or execute these files. Instead, identify the specific permission problem:<\/p>\n<pre><code class=\"language-bash\"># Better approach - diagnose then fix specifically\r\n$ ls -l \/var\/www\/html\/index.php\r\n-rw-r--r-- 1 alice alice 2048 Dec 26 12:00 index.php\r\n\r\n# Web server can't read because it's owned by alice\r\n# Fix: Change ownership, not permissions\r\n$ sudo chown www-data:www-data \/var\/www\/html\/index.php\r\n<\/code><\/pre>\n<h3>Mistake 2: Forgetting Recursive Operations Affect Everything<\/h3>\n<p>The <code>-R<\/code> flag is powerful but dangerous if you're not careful about what directory you target:<\/p>\n<pre><code class=\"language-bash\"># DANGEROUS - This breaks system files\r\n$ sudo chown -R username \/etc\r\n\r\n# SAFE - Be specific about subdirectories\r\n$ sudo chown -R username \/etc\/myapp\r\n<\/code><\/pre>\n<p>Always double-check your path before running recursive ownership or permission changes. One typo can affect thousands of files.<\/p>\n<h3>Mistake 3: Changing Permissions Without Changing Ownership<\/h3>\n<p>You set perfect permissions, but the file still doesn't work because it's owned by the wrong user:<\/p>\n<pre><code class=\"language-bash\"># This doesn't help if www-data doesn't own the file\r\n$ sudo chmod 644 \/var\/www\/config.php\r\n\r\n# Need both ownership and permissions\r\n$ sudo chown www-data:www-data \/var\/www\/config.php\r\n$ sudo chmod 644 \/var\/www\/config.php\r\n<\/code><\/pre>\n<p>Remember that permissions are applied to the owner, group, and others based on the ownership attributes. Changing permissions without checking ownership first is treating the symptom, not the cause.<\/p>\n<h3>Mistake 4: Breaking SSH by Wrong Key Permissions<\/h3>\n<p>SSH is notoriously strict about key file permissions. If they're too permissive, SSH refuses to use them:<\/p>\n<pre><code class=\"language-bash\"># This breaks SSH access\r\n$ chmod 644 ~\/.ssh\/id_rsa\r\n$ ssh user@server\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\n@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @\r\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r\nPermissions 0644 for 'id_rsa' are too open.\r\n\r\n# Fix: Private keys must be 600, owned by you\r\n$ chmod 600 ~\/.ssh\/id_rsa\r\n$ chown username:username ~\/.ssh\/id_rsa\r\n<\/code><\/pre>\n<p>The SSH directory itself also needs specific permissions: <code>chmod 700 ~\/.ssh<\/code> ensures only you can access it.<\/p>\n<h3>Mistake 5: Not Testing Permission Changes<\/h3>\n<p>After changing permissions or ownership, always verify the change worked and didn't break anything:<\/p>\n<pre><code class=\"language-bash\"># Make changes\r\n$ sudo chown -R www-data:www-data \/var\/www\/myapp\r\n$ sudo chmod -R 755 \/var\/www\/myapp\r\n\r\n# Verify ownership\r\n$ ls -l \/var\/www\/myapp\r\ndrwxr-xr-x 3 www-data www-data 4096 Dec 26 12:30 public\r\n-rw-r--r-- 1 www-data www-data 2048 Dec 26 12:30 index.php\r\n\r\n# Test the application\r\n$ curl http:\/\/localhost\/myapp\/\r\n# Should return content, not permission errors\r\n<\/code><\/pre>\n<p>This catch errors before they affect users or break production systems.<\/p>\n<h2>Advanced Permission Concepts: Beyond Basic chown and chmod<\/h2>\n<p>Once you've mastered the fundamentals, these advanced concepts give you even more precise control over file access in complex scenarios.<\/p>\n<h3>The setuid and setgid Bits<\/h3>\n<p>Special permission bits allow programs to run with elevated privileges or ensure files inherit group ownership:<\/p>\n<p><strong>setuid (Set User ID)<\/strong>: When set on an executable, it runs with the permissions of the file's owner, not the user executing it. The classic example is the <code>passwd<\/code> command, which needs root privileges to modify <code>\/etc\/shadow<\/code>:<\/p>\n<pre><code class=\"language-bash\"># The passwd command has setuid set\r\n$ ls -l \/usr\/bin\/passwd\r\n-rwsr-xr-x 1 root root 68208 Nov 29 2022 \/usr\/bin\/passwd\r\n# Notice the 's' in place of 'x' for owner permissions\r\n<\/code><\/pre>\n<p>You can set the setuid bit with <code>chmod 4755<\/code> (the \"4\" represents setuid) or <code>chmod u+s<\/code>.<\/p>\n<p><strong>setgid (Set Group ID)<\/strong>: On directories, this ensures new files inherit the directory's group ownership rather than the creator's primary group:<\/p>\n<pre><code class=\"language-bash\"># Set setgid on a shared directory\r\n$ sudo chmod g+s \/var\/projects\/shared\r\n$ ls -ld \/var\/projects\/shared\r\ndrwxrwsr-x 2 root developers 4096 Dec 26 13:00 \/var\/projects\/shared\r\n# Notice the 's' in the group permissions\r\n<\/code><\/pre>\n<p>This is essential for collaborative directories where multiple users need consistent group access.<\/p>\n<h3>The Sticky Bit for Shared Directories<\/h3>\n<p>The sticky bit prevents users from deleting files they don't own, even if the directory permissions would normally allow it. This is commonly used on <code>\/tmp<\/code>:<\/p>\n<pre><code class=\"language-bash\"># Check \/tmp permissions\r\n$ ls -ld \/tmp\r\ndrwxrwxrwt 15 root root 4096 Dec 26 13:15 \/tmp\r\n# Notice the 't' at the end\r\n\r\n# Set sticky bit on a shared directory\r\n$ sudo chmod +t \/var\/shared\/uploads\r\n$ ls -ld \/var\/shared\/uploads\r\ndrwxrwxr-t 2 root root 4096 Dec 26 13:20 \/var\/shared\/uploads\r\n<\/code><\/pre>\n<p>Now users can create files in this directory, but they can only delete their own files, not files created by others.<\/p>\n<h3>Access Control Lists (ACLs) for Fine-Grained Control<\/h3>\n<p>Traditional Unix permissions are limited to owner, group, and others. ACLs allow you to grant specific permissions to specific users without changing the file's group:<\/p>\n<pre><code class=\"language-bash\"># Give user 'bob' read access to a file without changing ownership\r\n$ setfacl -m u:bob:r file.txt\r\n\r\n# View ACL permissions\r\n$ getfacl file.txt\r\n# file: file.txt\r\n# owner: alice\r\n# group: developers\r\nuser::rw-\r\nuser:bob:r--\r\ngroup::r--\r\nmask::r--\r\nother::---\r\n<\/code><\/pre>\n<p>ACLs solve the problem where you need to grant access to multiple specific users without creating complex group structures.<\/p>\n<h2>Testing Your Understanding: Hands-On Practice<\/h2>\n<p>The best way to master <code>chown<\/code> and <code>chmod<\/code> is through hands-on practice. If you want to experiment safely without risking a production system, spin up a <a href=\"https:\/\/www.ssdnodes.com\/\">development VPS<\/a> where you can try these commands freely, and even if you mess up, you can just reinstall your OS and start fresh.<\/p>\n<p>Here are some practical exercises to solidify your understanding:<\/p>\n<h3>Exercise 1: Basic Ownership and Permission Changes<\/h3>\n<pre><code class=\"language-bash\"># Create test files\r\n$ mkdir -p ~\/practice\/testdir\r\n$ touch ~\/practice\/testfile.txt\r\n$ touch ~\/practice\/script.sh\r\n\r\n# Practice chown\r\n$ sudo chown :users ~\/practice\/testfile.txt\r\n$ ls -l ~\/practice\/testfile.txt\r\n# Should show group changed to 'users'\r\n\r\n# Practice chmod\r\n$ chmod 755 ~\/practice\/script.sh\r\n$ ls -l ~\/practice\/script.sh\r\n# Should show -rwxr-xr-x\r\n\r\n# Try symbolic notation\r\n$ chmod u+x,g-w,o-r ~\/practice\/testfile.txt\r\n$ ls -l ~\/practice\/testfile.txt\r\n# Should show modified permissions\r\n<\/code><\/pre>\n<h3>Exercise 2: Web Server Scenario<\/h3>\n<pre><code class=\"language-bash\"># Simulate web application setup\r\n$ mkdir -p ~\/webapp\/{public,storage,logs}\r\n$ touch ~\/webapp\/public\/index.html\r\n$ touch ~\/webapp\/storage\/cache.db\r\n\r\n# Set appropriate ownership (using your username instead of www-data)\r\n$ sudo chown -R $USER:$USER ~\/webapp\r\n\r\n# Set appropriate permissions\r\n$ chmod 755 ~\/webapp\/public\r\n$ chmod 775 ~\/webapp\/storage\r\n$ chmod 775 ~\/webapp\/logs\r\n$ chmod 644 ~\/webapp\/public\/index.html\r\n\r\n# Verify your setup\r\n$ ls -lR ~\/webapp\r\n<\/code><\/pre>\n<h3>Exercise 3: Multi-User Collaboration<\/h3>\n<pre><code class=\"language-bash\"># Create a shared project structure\r\n$ sudo mkdir -p \/tmp\/team-project\/{src,docs,bin}\r\n$ sudo chown -R :users \/tmp\/team-project\r\n$ sudo chmod -R 775 \/tmp\/team-project\r\n\r\n# Set setgid so new files inherit group\r\n$ sudo chmod g+s \/tmp\/team-project\r\n\r\n# Test creating files as different users\r\n$ touch \/tmp\/team-project\/src\/myfile.txt\r\n$ ls -l \/tmp\/team-project\/src\/myfile.txt\r\n# Should show group ownership of 'users'\r\n<\/code><\/pre>\n<h2>Troubleshooting Common Permission Issues<\/h2>\n<p>When things go wrong with file permissions or ownership, these diagnostic steps help identify and fix the problem quickly.<\/p>\n<h3>Diagnosing Permission Problems<\/h3>\n<p>Start by examining the current state:<\/p>\n<pre><code class=\"language-bash\"># Check ownership and permissions\r\n$ ls -l problematic-file.txt\r\n-rw-r--r-- 1 alice developers 2048 Dec 26 14:00 problematic-file.txt\r\n\r\n# Check which user is trying to access it\r\n$ whoami\r\nbob\r\n\r\n# Check if bob is in the developers group\r\n$ groups bob\r\nbob : bob developers\r\n\r\n# Check if the process trying to access it runs as a different user\r\n$ ps aux | grep process-name\r\nwww-data 1234 0.0 0.1 12345 6789 ? Ss 14:00 0:00 process-name\r\n<\/code><\/pre>\n<p>This reveals the mismatch: Bob is in the developers group and should have read access, but if a process runs as www-data, it only gets \"other\" permissions (the final <code>r--<\/code>).<\/p>\n<h3>Common Solutions<\/h3>\n<p><strong>Web server can't read files<\/strong>: Usually an ownership issue, not permissions:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -R www-data:www-data \/var\/www\/html\r\n<\/code><\/pre>\n<p><strong>Users can't write to shared directory<\/strong>: Need both group ownership and write permissions:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -R :developers \/shared\/project\r\n$ sudo chmod -R 775 \/shared\/project\r\n$ sudo chmod g+s \/shared\/project  # setgid for new files\r\n<\/code><\/pre>\n<p><strong>Application can't write to logs<\/strong>: Ownership and directory permissions both matter:<\/p>\n<pre><code class=\"language-bash\">$ sudo chown -R appuser:appuser \/var\/log\/myapp\r\n$ sudo chmod 755 \/var\/log\/myapp\r\n$ sudo chmod 644 \/var\/log\/myapp\/*.log\r\n<\/code><\/pre>\n<p><strong>SSH key rejected<\/strong>: Too permissive permissions on private key:<\/p>\n<pre><code class=\"language-bash\">$ chmod 600 ~\/.ssh\/id_rsa\r\n$ chmod 700 ~\/.ssh<\/code><\/pre>\n<h2>Conclusion: Mastering File Ownership and Permissions<\/h2>\n<p>Understanding the difference between <code>chown<\/code> and <code>chmod<\/code> is fundamental to effective Linux system administration. These commands work together to create a flexible, secure environment where the right users have the right access to the right files.<\/p>\n<p>Remember the core principle: <code>chown<\/code> controls who owns files (identity), while <code>chmod<\/code> controls what can be done with them (capability). Most real-world scenarios require both commands working in concert, setting ownership first with <code>chown<\/code>, then defining permissions with <code>chmod<\/code>.<\/p>\n<p>As you work with these commands more, the patterns become second nature. Web applications need files owned by the web server user with read permissions for everyone. Shared development directories need group ownership with setgid bits. SSH keys need restrictive 600 permissions owned by a single user. Collaborative projects need careful balance of user and group permissions.<\/p>\n<p>The best way to truly master these concepts is through hands-on practice on your own <a href=\"https:\/\/www.ssdnodes.com\/\">SSD Nodes VPS environmen<\/a>t, where you can experiment freely without risk. Whether you're deploying applications, managing development teams, or securing production systems, <code>chown<\/code> and <code>chmod<\/code> are tools you'll use daily (getting comfortable with them now pays dividends throughout your Linux administration career).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>chown vs chmod explained: learn who owns your files, who can access them, and how to avoid permission errors on your Linux VPS.<\/p>\n","protected":false},"author":19,"featured_media":15099,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[41,18,30],"tags":[],"class_list":["post-15044","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-comparisons","category-devops","category-tutorials"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/15044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/comments?post=15044"}],"version-history":[{"count":12,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/15044\/revisions"}],"predecessor-version":[{"id":15238,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/posts\/15044\/revisions\/15238"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media\/15099"}],"wp:attachment":[{"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/media?parent=15044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/categories?post=15044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ssdnodes.com\/wp-json\/wp\/v2\/tags?post=15044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}