Re: [SLUG] Re: rsync suggestions

From: Bryan J. Smith (b.j.smith@ieee.org)
Date: Thu Dec 09 2004 - 14:11:59 EST


From: James Marcinek
> No, in fact that didn't over-ride the original permissions.
> The user on the original system to backup is not root but another;
> why I'm having the permissions problems.
> The system security is configured to not allow
root to ssh directly.

That's why you can't read all the files, or chown the copies .
Only root is allowed to do that.

> One way I was considering circumventing this would be to
> set the rsync executable to the root user so any user
> that has access to execute
it would run it as root.

That's probably far worse.
I'd run the job as root, then login to the remote system as a normal user.
That way you can still write the files.
You then need a script to reapply permissions.

> I was planning to setting the rsync executable access so that only the user (by group
acl)
> or root could run the command to lock it down...

sudo is another option.
Setup both systems so rsync runs as root for your backup user.

> I'd be interested in any examples.

I wrote one for Phil Barnett in August.
I keep meaning to send it to Ed Schaefer.
He says I still owe him a script for his Sys Admin/UNIX Review column because the last time I sent him a script,
they turned it into its own article. ;->

> But wouldn't this require that would require
> the 'original backup server' to initiate this

No. You could run it at anytime in a cron job.
Ideally you should take a "snapshot" and rsync to it, and generate the script from that.
But I'm probably just being anal. :->

> or would you have the ssh initiate the script?

Not unless you were logged in as root.

> I still run into the DHCP dilema...

Right, you're initiating the backup from a remote system _to_ the server.

Don't know what to tell you there except setup sudo so rsyc runs as root on both sides.
That's the only thing that will ensure you get all files if the process is not initiated as root on the system you are backing up.

-- 
Bryan J. Smith (currently mobile)
b.j.smith@ieee.org

----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:28:01 EDT