I am using a script to copy files from amazon instances to a network drive using rsync. After the file copy I am trying to change the owner of these transferred files but am not able to. What is the correct method to change the ownership of files on network folders? I tried something like
chown root:root /mapped/location/
I get a permission denied exception. How can I achieve what I am trying to achieve?