शब्दकोश · ऑपरेटिंग सिस्टम और सॉफ़्टवेयर

chmod (File Permissions)

chmod is the Unix command that changes who may read, write, or execute a file, using permission settings for the owner, group, and everyone else.

अपडेट: अक्टूबर 6, 2026

chmod (change mode) is a Unix and Linux command that sets file permissions. Each file has read, write, and execute permissions for three classes: the owner, the group, and others.

Why it matters

Correct permissions protect secrets and keep web servers working. A private key readable by everyone is a risk, while a script without execute permission will not run. Permissions can be written as letters or as a number, where read is 4, write is 2, and execute is 1, added together.

Web files typically need to be readable by the web server user, not writable.

Example

$ chmod 640 config.php
$ ls -l config.php
-rw-r----- 1 dev www-data 812 config.php

640 gives the owner read and write (6), the group read (4), and others nothing (0).

Common mistakes

  • Using chmod 777 to fix an error, which lets any user modify the file.
  • Setting execute on every file instead of only scripts and directories.
  • Fixing permissions when the real problem is the file owner; check chown.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

यह पेज सामान्य जानकारी है, जिसे हमारी संपादकीय टीम ने लिखा है और दस्तावेज़ीकरण बदलने पर अपडेट किया जाता है। सर्वर और प्रदाता अलग-अलग होते हैं, इसलिए बदलाव पहले सुरक्षित तरीके से जाँचें। देखें: संपादकीय नीति और अस्वीकरण.