๐Ÿ”ฅ ๐”๐ง๐ฅ๐ž๐š๐ฌ๐ก ๐˜๐จ๐ฎ๐ซ ๐ƒ๐ž๐ฏ๐Ž๐ฉ๐ฌ ๐๐จ๐ญ๐ž๐ง๐ญ๐ข๐š๐ฅ: ๐„๐ฌ๐ฌ๐ž๐ง๐ญ๐ข๐š๐ฅ ๐‹๐ข๐ง๐ฎ๐ฑ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐๐ฌ ๐Œ๐š๐ฌ๐ญ๐ž๐ซ๐ฒ!
๐๐š๐ซ๐ญ-5๐Ÿš€

๐Ÿ”ฅ ๐”๐ง๐ฅ๐ž๐š๐ฌ๐ก ๐˜๐จ๐ฎ๐ซ ๐ƒ๐ž๐ฏ๐Ž๐ฉ๐ฌ ๐๐จ๐ญ๐ž๐ง๐ญ๐ข๐š๐ฅ: ๐„๐ฌ๐ฌ๐ž๐ง๐ญ๐ข๐š๐ฅ ๐‹๐ข๐ง๐ฎ๐ฑ ๐‚๐จ๐ฆ๐ฆ๐š๐ง๐๐ฌ ๐Œ๐š๐ฌ๐ญ๐ž๐ซ๐ฒ! ๐๐š๐ซ๐ญ-5๐Ÿš€

ยท

2 min read

Embark on the next phase of your journey as we delve deep into the 'change mode' command to streamline workflows. Let's elevate our DevOps game together! ๐Ÿš€

Explain chmod command?

As a DevOps engineer, it's essential to understand how to manage file permissions in Linux systems using the ๐œ๐ก๐ฆ๐จ๐ command. chmod is a powerful tool that allows us to modify access permissions for files and directories.

There are two primary ways to use chmod: ๐ฌ๐ฒ๐ฆ๐›๐จ๐ฅ๐ข๐œ ๐š๐ซ๐ ๐ฎ๐ฆ๐ž๐ง๐ญ๐ฌ and ๐ง๐ฎ๐ฆ๐ž๐ซ๐ข๐œ ๐š๐ซ๐ ๐ฎ๐ฆ๐ž๐ง๐ญ๐ฌ.

๐’๐ฒ๐ฆ๐›๐จ๐ฅ๐ข๐œ ๐€๐ซ๐ ๐ฎ๐ฆ๐ž๐ง๐ญ๐ฌ:

Symbolic arguments involve using letters to represent permission groups:
-> '๐š' stands for all
-> '๐ฎ' stands for user
-> '๐ ' stands for group
-> '๐จ' stands for other

You can then use + to add a permission or - to remove a permission, followed by one or more permission symbols (r, w, x).

For example:
๐’„๐’‰๐’Ž๐’๐’… ๐’‚+๐’“ ๐’‡๐’Š๐’๐’†๐’๐’‚๐’Ž๐’† # Everyone can now read.
๐’„๐’‰๐’Ž๐’๐’… ๐’–+๐’“๐’˜ ๐’‡๐’Š๐’๐’†๐’๐’‚๐’Ž๐’† # User can read and write.

๐๐ฎ๐ฆ๐ž๐ซ๐ข๐œ ๐€๐ซ๐ ๐ฎ๐ฆ๐ž๐ง๐ญ๐ฌ:

Numeric arguments are used to establish permissions for all three groups simultaneously, using sets of three digits:
-> '1' for execute
-> '2' for write
-> '3' for write and execute
-> '4' for read
-> '5' for read and execute
-> '6' for read and write
-> '7' for read, write, and execute

For example:
๐œ๐ก๐ฆ๐จ๐ 777 ๐Ÿ๐ข๐ฅ๐ž๐ง๐š๐ฆ๐ž # Grants full permissions to the owner, group, and others.

๐”๐ง๐๐ž๐ซ๐ฌ๐ญ๐š๐ง๐๐ข๐ง๐  ๐ญ๐ก๐ž ๐ง๐ฎ๐ฆ๐ž๐ซ๐ข๐œ ๐ซ๐ž๐ฉ๐ซ๐ž๐ฌ๐ž๐ง๐ญ๐š๐ญ๐ข๐จ๐ง:
โญ The first digit (7) corresponds to the owner's permissions.
โญ The second digit (7) corresponds to the group's permissions.
โญ The third digit (7) corresponds to others' permissions.

๐„๐š๐œ๐ก ๐๐ข๐ ๐ข๐ญ ๐ข๐ฌ ๐š ๐ฌ๐ฎ๐ฆ ๐จ๐Ÿ:
โญ 4 for read permission.
โญ 2 for write permission.
โญ 1 for execute permission.

You can use ๐ฅ๐ฌ -๐ฅ to view the permissions of a file or directory, where the permission pattern includes r for read, w for write, and x for execute, with dashes (-) indicating absence of a particular permission.

Understanding and effectively utilizing chmod commands is crucial for managing access control in Linux environments.

๐‡๐ž๐ซ๐ž ๐ข๐ฌ ๐ญ๐ก๐ž ๐Ÿ๐ข๐ซ๐ฌ๐ญ ๐ฉ๐š๐ซ๐ญ -> ayushmaggo.hashnode.dev/1

๐‡๐ž๐ซ๐ž ๐ข๐ฌ ๐ญ๐ก๐ž ๐ฌ๐ž๐œ๐จ๐ง๐ ๐ฉ๐š๐ซ๐ญ -> ayushmaggo.hashnode.dev/2

Here is the third part -> ayushmaggo.hashnode.dev/3

Here is the fourth part -> https://ayushmaggo.hashnode.dev/4

Thank you for reading this blog, and I hope you found it informative. If you found this blog helpful, please like, share, and follow me for more blog posts like this in the future.

--Happy learning!!!

ย