File Permissions को समझना
File permissions घर के rules जैसे हैं जो बताते हैं कौन कुछ पढ़, बदल, या उपयोग कर सकता है। हर file के owner, उसके group, और बाकी सभी के लिए एक-एक set of rules होता है।
In this page:
Syntax
chmod mode file_name
# e.g. chmod 755 file_name or chmod u+x file_name
File Permissions
File permissions owner, group, और others के लिए read (r), write (w), और execute (x) access control करते हैं, ls -l से viewable।
chmod उन्हें बदलता है, या तो symbolically (chmod u+x file) या numerically (chmod 755 file)। Numeric mode (owner/group/other को तीन digits के रूप में) समझना script और file access manage करने के लिए essential है।
Note:
chmod 755 एक executable script के लिए common mode है: owner read/write/execute कर सकता है, बाकी सभी read/execute कर सकते हैं।उदाहरण: File Permissions
#!/bin/bash
touch demo.sh
chmod 755 demo.sh
ls -l demo.sh
chmod u-x demo.sh
ls -l demo.sh
Login to try C/C++/Java/PHP code in the editor
Related Topics
{# common_mistakes/chapter_summary/browser_support: on Hindi pages the
view already swaps in the hi_ translation fields (or blanks these
out if untranslated), so this renders correctly for both languages
without a lang_code check here. #}
आम गलतियां
- Problems fix करने के लिए
chmod 777उपयोग करना, जो files को सबके लिए writable बना देता है। chmod 640में owner, group और others के digits को mix up करना।- यह भूल जाना कि directories में enter करने के लिए execute bit चाहिए।
🔒
Chapter Quiz — Complete all 13 topics to unlock
0/13 topics done
Complete these topics first: