chown user linux file code example
Example 1: chown
Examples
chown root /u
Change the owner of /u to "root".
chown root:staff /u
Likewise, but also change its group to "staff".
chown -hR root /u
Change the owner of /u and subfiles to "root".
Example 2: linux chown
chown [OPTIONS] USER[:GROUP] FILE(s)