sudo(8) chown.1posix username:username -R -L ~
execute a command as another user
change the file ownership
-R     Recursively  change  file  user and group IDs. For each file operand that names a directory, chown
       shall change the user ID (and group ID, if specified) of the directory and all files in  the  file
       hierarchy  below  it. Unless a -H, -L, or -P option is specified, it is unspecified which of these
       options will be used as the default.
-L     If  the  -R  option  is  specified  and  a  symbolic  link referencing a file of type directory is
       specified on the command line or encountered during the traversal of a file hierarchy, chown shall
       change  the  user ID (and group ID, if specified) of the directory referenced by the symbolic link
       and all files in the file hierarchy below it.
source manpages: sudochown