1e41f4b71Sopenharmony_ci# chmod 2e41f4b71Sopenharmony_ci 3e41f4b71Sopenharmony_ci 4e41f4b71Sopenharmony_ci## Command Function 5e41f4b71Sopenharmony_ci 6e41f4b71Sopenharmony_ciThis command is used to change file operation permissions. 7e41f4b71Sopenharmony_ci 8e41f4b71Sopenharmony_ci 9e41f4b71Sopenharmony_ci## Syntax 10e41f4b71Sopenharmony_ci 11e41f4b71Sopenharmony_cichmod [_mode_] [_filename_] 12e41f4b71Sopenharmony_ci 13e41f4b71Sopenharmony_ci 14e41f4b71Sopenharmony_ci## Parameters 15e41f4b71Sopenharmony_ci 16e41f4b71Sopenharmony_ci**Table 1** Parameter description 17e41f4b71Sopenharmony_ci 18e41f4b71Sopenharmony_ci| Parameter | Description | Value Range | 19e41f4b71Sopenharmony_ci| -------- | ------------------------------------------------------------ | -------------- | 20e41f4b71Sopenharmony_ci| mode | Specifies the permissions for a file or directory. The value is an octal number, representing the permission of **User** (owner), **Group** (group), or **Others** (other groups).| [0, 777] | 21e41f4b71Sopenharmony_ci| filename | Specifies the file path. | An existing file | 22e41f4b71Sopenharmony_ci 23e41f4b71Sopenharmony_ci 24e41f4b71Sopenharmony_ci## Usage Guidelines 25e41f4b71Sopenharmony_ci 26e41f4b71Sopenharmony_ci- Specify **mode** to change file permissions. 27e41f4b71Sopenharmony_ci 28e41f4b71Sopenharmony_ci- For the files created on the FAT file system, the file permission attributes are the same as those of the mounted nodes. Currently, the node permissions include only user read and write. The **group** and **others** permissions do not take effect. In addition, only the user read and write permissions can be modified. The read and write permissions are **rw** and **ro** only. There is no such restriction for other file systems. 29e41f4b71Sopenharmony_ci 30e41f4b71Sopenharmony_ci## Note 31e41f4b71Sopenharmony_ci 32e41f4b71Sopenharmony_ciCurrently, the shell does not support this command. 33e41f4b71Sopenharmony_ci 34e41f4b71Sopenharmony_ci## Example 35e41f4b71Sopenharmony_ci 36e41f4b71Sopenharmony_ciChange the permissions on the **hello-openharmony.txt** file to **644** and **777**. 37e41f4b71Sopenharmony_ci 38e41f4b71Sopenharmony_ci 39e41f4b71Sopenharmony_ci## Output 40e41f4b71Sopenharmony_ci 41e41f4b71Sopenharmony_ciModify the permissions on the **hello-openharmony.txt** file in the **/dev** directory. 42e41f4b71Sopenharmony_ci 43e41f4b71Sopenharmony_ci``` 44e41f4b71Sopenharmony_ciOHOS:/dev$ chmod 644 hello-openharmony.txt 45e41f4b71Sopenharmony_ciOHOS:/dev$ ll hello-openharmony.txt 46e41f4b71Sopenharmony_ci-rw-r--r-- 0 0 0 0 1970-01-01 00:00 hello-openharmony.txt 47e41f4b71Sopenharmony_ciOHOS:/dev$ chmod 777 hello-openharmony.txt 48e41f4b71Sopenharmony_ciOHOS:/dev$ ll hello-openharmony.txt 49e41f4b71Sopenharmony_ci-rwxrwxrwx 0 0 0 0 1970-01-01 00:00 hello-openharmony.txt 50e41f4b71Sopenharmony_ci``` 51