1e41f4b71Sopenharmony_ci# chown
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci
4e41f4b71Sopenharmony_ci## Command Function
5e41f4b71Sopenharmony_ci
6e41f4b71Sopenharmony_ciThis command is used to change the owner of a file.
7e41f4b71Sopenharmony_ci
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci## Syntax
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_cichown [_owner_] [_pathname_]
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| owner    | Specifies the file owner. | [0, 0xFFFFFFFF] |
21e41f4b71Sopenharmony_ci| pathname | Specifies the file path. | An existing file |
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ci
24e41f4b71Sopenharmony_ci## Usage Guidelines
25e41f4b71Sopenharmony_ci
26e41f4b71Sopenharmony_ciThis command does not apply to the FAT file system.
27e41f4b71Sopenharmony_ci
28e41f4b71Sopenharmony_ci## Note
29e41f4b71Sopenharmony_ci
30e41f4b71Sopenharmony_ciCurrently, the shell does not support this command.
31e41f4b71Sopenharmony_ci
32e41f4b71Sopenharmony_ci## Example
33e41f4b71Sopenharmony_ci
34e41f4b71Sopenharmony_ciRun **chown 100 testfile**.
35e41f4b71Sopenharmony_ci
36e41f4b71Sopenharmony_ci
37e41f4b71Sopenharmony_ci## Output
38e41f4b71Sopenharmony_ci
39e41f4b71Sopenharmony_ciChange the UID of the **testfile** file in **/dev** to **100**.
40e41f4b71Sopenharmony_ci
41e41f4b71Sopenharmony_ci```
42e41f4b71Sopenharmony_ciOHOS:/dev$ touch testfile
43e41f4b71Sopenharmony_ciOHOS:/dev$ ll testfile
44e41f4b71Sopenharmony_ci-rw-r--r-- 0 0 100 0 1970-01-01 00:00 testfile
45e41f4b71Sopenharmony_ciOHOS:/dev$ chown 100 testfile
46e41f4b71Sopenharmony_ciOHOS:/dev$ ll testfile
47e41f4b71Sopenharmony_ci-rw-r--r-- 0 100 100 0 1970-01-01 00:00 testfile
48e41f4b71Sopenharmony_ci```
49