LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Rsync Permission denied (13) (https://www.linuxquestions.org/questions/linux-server-73/rsync-permission-denied-13-a-4175546202/)

Patel119 06-23-2015 09:49 AM

Rsync Permission denied (13)
 
I am running this command:
Code:

rsync -avzhe ssh syncer@IP_ADRESS:/home/user1/public_html/Files/Tools /myfiles
I keep getting
Quote:

Permission denied (13)
The only way I can make it work is to change "syncer@IP_ADRESS" to "user1@IP_ADRESS". It works with user1 because the directory I'm trying to rsync is owned by user1. Not even root user works.

How can I get user, "syncer" to work. I already gave syncer root access.

linom 06-23-2015 10:04 AM

Does /myfiles folder has the permission to be copied to this folder?

Patel119 06-23-2015 10:07 AM

Quote:

Originally Posted by linom (Post 5381692)
Does /myfiles folder has the permission to be copied to this folder?

Yes it does.

I did a test with rsync, but this time the "test" folder was created by the root user.
Code:

rsync -avzhe ssh syncer@IP_ADRESS:/test /myfiles

michaelk 06-23-2015 10:43 AM

Why do you not want to log in as user1?

Do you still have sshd configured to allow root to log in i.e. PermitRootLogin yes on your server?

Patel119 06-23-2015 10:48 AM

Quote:

Originally Posted by michaelk (Post 5381706)
Why do you not want to log in as user1?

Do you still have sshd configured to allow root to log in i.e. PermitRootLogin yes on your server?

I would like to use syncer for better security. I will be running rsync every 24 hours.

I am using rsync with raspberry pi, so I don't have a sshd config option, only option is to enable/disable SSH.

michaelk 06-23-2015 10:56 AM

Given that syncer has root access why do think it would have better security then using user1 with keys?

/etc/ssh/sshd_config does not exist?

Patel119 06-23-2015 11:02 AM

Quote:

Originally Posted by michaelk (Post 5381715)
Given that syncer has root access why do think it would have better security then using user1 with keys?

/etc/ssh/sshd_config does not exist?

Hmmmm, I guess it wouldn't really. My initial thought was that syncer didn't need root for it to copy files.

Looks like /etc/ssh/sshd_config did work. PermitRootLogin was already enabled.

michaelk 06-23-2015 11:14 AM

Well, better security would be to set not allow root login.

Patel119 06-23-2015 11:21 AM

Quote:

Originally Posted by michaelk (Post 5381724)
Well, better security would be to set not allow root login.

Should I disable permitrootlogin and use user1 with rsync?

michaelk 06-23-2015 12:21 PM

Yes, in my humble opinion.


All times are GMT -5. The time now is 11:38 PM.