Changing permissions in Linux in hindi

Linux mein permissions ko modify karne ke liye chmod command ka istemal hota hai. Is command se aap file ya directory ke liye read (r), write (w), aur execute (x) permissions ko add (+) ya remove (-) kar sakte hain. Main aapko kuch common scenarios aur examples ke sath permissions ko modify karne ka tariqa batata hoon:

Changing permissions in Linux in hindi

chmod Command Syntax:

chmod [permissions] [file_or_directory]
  • [permissions] mein aapko specify karna hota hai ki kaun si permissions ko modify karna hai aur kis category (owner, group, others) ke liye. Permissions ko symbolically ya numerically specify kiya ja sakta hai.
  • [file_or_directory] mein aapko specify karna hota hai ki kis file ya directory ke liye permissions set karni hai.

Symbolic Permissions:
Symbolic permissions ka istemal permissions ko textually specify karne ke liye hota hai. Yeh permissions ko u (owner), g (group), aur o (others) ke liye alag-alag tarike se set karne mein madadgar hota hai. Yeh permissions ko add karne ke liye + aur remove karne ke liye - ka istemal hota hai.

Example 1:
Owner ko write (w) permission add karna:

chmod u+w file.txt

Example 2:
Group aur others se execute (x) permission remove karna:

chmod go-x file.txt

Numerical Permissions:
Numerical permissions ka istemal permissions ko octal (base-8) format mein specify karne ke liye hota hai. Har permission (read, write, execute) ko ek unique number ke sath represent kiya jata hai.

  • 4 represents read (r) permission.
  • 2 represents write (w) permission.
  • 1 represents execute (x) permission.
  • 0 represents no permission.

Example 3:
Owner ko read (r) aur write (w) permissions, group aur others ko sirf read (r) permission dena:

chmod 644 file.txt

Example 4:
Owner ko full permissions dena (read, write, execute), group aur others ko sirf read (r) permission dena:

chmod 700 file.txt

Yeh examples aapko chmod command ka istemal permissions ko modify karne mein madadgar sabit ho sakte hain. Permissions ko secure tarike se manage karna Linux mein security ke liye bahut mahatvapurn hota hai, isliye permissions ko carefully set karein.

Leave a Comment