New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
rsync not creating folder on remote server
I am trying to sync data between local and remote server. But rsync throws following error if the folder being sync'd already doesn't exist on remote.
Permission denied (13)
I am logged in as user user1 on local server from where I am running following command. The folder on local is owned by user user2. If I create the same folder 2023 on remote and make user2 its owner, then the following command works otherwise it doesn't.
rsync -av --delete -e ssh /uploads/2023/ remotevps:/uploads/2023
What's the solution?

Comments
Alilet, are saying that you do not see problem with permissions? What cgpt says about this matter when you paste logs?
it means the user that is connecting via ssh (for rsync) doesn't have permission to mkdir in /uploads, fix it.
Ok I just checked that even if the folder is there, it will not sync files within and will throw same error. Seems like some permission issue. Let me check.
You're in the best position to check permissions, but is "Permission denied (13)" the whole error message?
Here is complete message.
The user on the remote server doesn't have permission to write to the directory
/uploads/2023Yeah this was the issue. I used
chownto assign permission to thatuser1but kept groupuser2and now it is working.