LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 01-31-2012, 04:10 PM   #1
amdowney
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Rep: Reputation: Disabled
Unhappy Run aground trying to get my rsync server to login to my VPS as root!!


Hello I'm new here,

I am a windows user generally but have a solid Centos 5.5 VPS with WHM with a provider and have lightly dabbled in accessing it via putty, doing some basic stuff including rsyncing to some backup space provided by the host.

I thought however I'd use an old box to install Centos 6 to have a play with and use it as an Rsync backup box so I have my sites backed up on my premises as well.

My VPS is secure and I have to login as admin and su to root.

My Rsync script is as follows:
"rsync -r -a -v -e "ssh -l admin" xxx.xxx.xxx.xxx:/home/ /home/vpsbak", which logs in Ok as admin but gets permission denied when trying to read the /home directory. My slghlty helpful host has told me I need to set the conifg file rsyncd.conf to 'uid = root'.

I find this doesn't exist so create it with simply the above value added and 'read only = yes'.

However no change, I still get permission denied. I have been searching and searching and read about typing "rsync --config /etc/rsyncd.conf" but it's saying I need to add --daemon? I do this without error but the permission denied issue exists?

So confusing all this, I'd appreciate anyones help so much!

Last edited by amdowney; 01-31-2012 at 04:13 PM.
 
Old 01-31-2012, 08:10 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,048

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
Rsync can run natively or tunnel through ssh, the format you're using (a single ':' between host and path) is over ssh. This means (in your case) that the account you connect with needs permissions on the source location and the account you're running as needs permissions on the target location, you could also propagate some ssh keys to login without a password. Your command can be simplified to:

Code:
rsync -av admin@xxx.xxx.xxx.xxx:/home/ /home/vpsbak/

Last edited by kbp; 01-31-2012 at 08:12 PM.
 
Old 02-01-2012, 12:43 PM   #3
amdowney
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
I'm still none the wiser, the shortened code is going to do the same thing isn't it as it's still SSH? How do I go about running it natively?
 
Old 02-01-2012, 01:14 PM   #4
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 70
It's not at all clear what you want to achieve - are you trying to set up rsync daemon on CentOS 5.5 or do you simply want to pull back-ups over SSH?

Last edited by klearview; 02-01-2012 at 01:15 PM. Reason: grammar
 
Old 02-01-2012, 03:00 PM   #5
amdowney
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks for replying.

I simply want to pull a backup of my VPS's home directory to the computer I am working on. I don't mind entering a password and doing this manually once a week. As mentioned I can only login with admin and if I login via putty directly to the server I have to sudo su root to read the files. I guess I'm trying to make Rsync do the same?

Last edited by amdowney; 02-01-2012 at 03:02 PM.
 
Old 02-01-2012, 04:04 PM   #6
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,048

Rep: Reputation: 471Reputation: 471Reputation: 471Reputation: 471Reputation: 471
If you can't log in directly with the required permissions then I can think of a couple of options:

#manual process
- login via ssh as admin
- su to root
- rsync -av /home/ you@<your_pc>:/home/vpsbak/

#allow root login
- allow root to login via ssh using key based auth

#acl entry if supported by the filesystem
- add an acl to /home allowing admin to read the home directories
 
1 members found this post helpful.
Old 02-01-2012, 04:58 PM   #7
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 70
Quote:
Originally Posted by kbp View Post
...#acl entry if supported by the filesystem
- add an acl to /home allowing admin to read the home directories
That would be my choice.

amdowney, presumably your filesystem is ext3 - in this case you'll need to mount it with 'acl' option (change /etc/fstab options entry for appropriate partition from 'defaults' to 'rw,acl'); then remount. Use 'setfacl' to set acl permissions - see 'man setfacl'.
 
Old 02-02-2012, 01:24 PM   #8
amdowney
LQ Newbie
 
Registered: Jan 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks guys but you know what the ACL entry thing is tampering with my source VPS again isn't it and I'd rather not. It's solid and despite being a confident windows man I feel back at square 1 or 2 at the minute with my linux skillset.

I'm happy to initiate this manually once a week (I have Rsync and R1soft backups running daily with the host) so it looks like the simplest way is to SSH into the VPS and sudo root then initiate Rsync from there back to my PC isn't it.

Not sure what my host was thinking though when he said I could setup my rsync server and configure the rsyncd.conf to make this work despite being unable to login as root. I guess he must have thought I was doing it from my VPS...

Another quick question though, My 120Gb HDD has been split into 2 volumes it seems, root and home as well as a smaller one for boot. If I need to backup over 50gb (the space of the 2 larger partitions) can I enlarge one easily?

Last edited by amdowney; 02-02-2012 at 01:41 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Could I run rsync to download files from a server without rsync daemon? Richard.Yang Linux - Software 1 09-18-2009 04:08 AM
How do I login as root so I can run guarddog? M$ISBS Linux - Software 7 03-28-2006 11:29 PM
Where can I download UML VPS or Xen VPS to make a virtual private server? abefroman Linux - Software 3 12-09-2005 10:00 AM
How to run a script as root upon login zugvogel Linux - Newbie 7 09-09-2005 11:10 AM
Why not run always login as root? KaptinKABOOM Linux - General 8 07-18-2004 07:23 AM


All times are GMT -5. The time now is 01:22 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration