# chmod - [Command Function](#section13992936121418) - [Syntax](#section63342439147) - [Parameter Description](#section894414671411) - [Usage](#section182415221419) - [Example](#section8518195718147) - [Output](#section127391818158) ## Command Function This command is used to change the file operation permission. ## Syntax chmod \[_mode_\] \[_pathname_\] ## Parameter Description **Table 1** Parameters

Parameter

Description

Value Range

mode

Indicates the permission for a file or directory. The value is an octal number, representing the permission of User (owner), Group (group), or Other (other groups).

[0, 777]

pathname

Indicates the file path.

An existing file

## Usage By specifying the **mode** parameter before the file name, you can change the permission for this file. ## Example Enter **chmod 666 hello-harmony.txt**. ## Output **Figure 1** Changing the permission on the **hello-harmony.txt** file to **666** ![](figures/changing-the-permission-on-the-hello-harmony-txt-file-to-666.png "changing-the-permission-on-the-hello-harmony-txt-file-to-666")