I have redhat machine in this machine having some file under the /opt directory. I want to copy those file in remote machine /opt directory using rsync command. The condition is i'm using admin user which is part of wheel groups.
I have try following command to transfer the file but I getting permission denied error.
#rsync -avz -e "ssh -t" /opt/*.txt admin@ip:/opt
while I run this command i'm getting such error The error message you're encountering, mkstemp "/opt/test.txt" failed: permission denied (13), indicates that the rsync process is attempting to create a temporary file (test.txt) in a directory (/opt) where it doesn't have the necessary permissions to do so.
can anyone have idea how to process