# %chown() function

The %chown() function changes the owner-ID
and group-ID of the file *str* to the values specified
in *owner* and *group* respectively.

**For Windows:**Not Supported

## Syntax

```
var = %chown(str, owner, group)
```

## Example(s)

```
if %chown("/tmp/ap.log", 2000, 0) < 0 then
 crt ’Cannot change owner’; stop
end
```

## See also

- [FlashBASIC C functions overview](https://d3codex.com/pickbasic-flashbasic/flashbasic-c-functions-overview/)
- [cfunction statement](https://d3codex.com/pickbasic-flashbasic/cfunction-statement/)

---
Source: https://d3codex.com/pickbasic-flashbasic/percent-chown-function/ - part of the D3Codex reference.
