Error: "Copying files to remote side failed. Can't open that file: Permission denied"
So you are using WINSCP as your FTP Software. And that’s well known with the error you are searching about. Let us go from the scratch,
You should be getting this error when you are trying to replace the existing files on your hosting account.
To achieve this replacement you must change the ownership of the files. On most occasions with this issue the current hosting files should have been owned by ROOT. So those files’ ownership has to be changed to the USER, who is the actual owner of the files.
‘How come the ownership has changed?’ This question should be pondering you indeed.
This could have happened since you might have uploaded the files via root access or fetched the files there through root login.
So here is the command to change the ownership of those files.
Chown –R username:username /home/username/public_html/*
After this is done try replacing the same files.