Setting permissions in linux hindi

Linux mein file permissions ko set karne ke liye chmod command ka istemal hota hai. chmod command se aap file ya directory ke liye read (r), write (w), aur execute (x) permissions ko add (+) ya remove (-) kar sakte hain.

Setting permissions in linux 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:

  • chmod u+r file.txt: Owner ke liye read permission add karega.
  • chmod go-w directory/: Group aur others ke liye write permission remove karega.

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:

  • chmod 755 file.txt: Owner ko read, write, aur execute permissions, group aur others ko read aur execute permissions deta hai.
  • chmod 644 file.txt: Owner ko read aur write permissions deta hai, group aur others ko sirf read permissions deta hai.

Is tarah se aap chmod command ka istemal karke file permissions ko set kar sakte hain. Permissions ko secure tarike se manage karna Linux mein security ke liye mahatvapurn hota hai.

Leave a Comment