# chown - [Command Function](#section247414691513) - [Syntax](#section14773151018159) - [Parameter Description](#section598731391517) - [Usage](#section16524152071510) - [Example](#section17901152561510) - [Output](#section15513163115816) ## Command Function This command is used to change the owner and group of a specified file. ## Syntax chown \[_owner_\] \[_group_\] \[_pathname_\] ## Parameter Description **Table 1** Parameters

Parameter

Description

Value Range

owner

Indicates the file owner.

[0, 0xFFFFFFFF]

group

Indicates the file group.

  • Left blank
  • [0, 0xFFFFFFFF]

pathname

Indicates the file path.

An existing file

## Usage - By specifying the **owner** and **group** parameters in this command, you can change the owner and group of the file. - If the **owner** or **group** value is **-1**, the owner or group of the file will not be changed. - The **group** parameter can be left blank. ## Example Enter **chown 100 200 hello-harmony.txt**. ## Output **Figure 1** Changing the owner and group of the hello-harmony.txt file to 100 and 200 respectively ![](figure/changing-the-owner-and-group-of-the-hello-harmony-txt-file-to-100-and-200-respectively.png "changing-the-owner-and-group-of-the-hello-harmony-txt-file-to-100-and-200-respectively")