restrict sudo and chown in specified directory

Hi Dears,

I have one requirement like this:

  1. general user A can execute command C with root privilege by sudo configuration
  2. some folders and files are created during the command C execution
  3. user A cannot access those folders and files because the owner is root user, so I want the user A can execute chown command but restrict the scope as the parent directory created by the command C.

How to make the bold statement the truth?

Thanks!