My other solution was to have rsync put it someplace else so if it
trashes the permissions I don't care, since I have a script that runs
several rsync's I could have the script move it to the correct
location with the correct permissions.


On Wed, Jul 21, 2010 at 10:38 AM, Robert Nesius <nesius at gmail.com> wrote:
>
>
> On Wed, Jul 21, 2010 at 10:01 AM, James <jucziz6 at gmail.com> wrote:
>>
>> Anyone ever use rsync to propagate the sudoer file?
>>
>
> I've found that often times the best way to copy a file while preserving its
> permissions is to wrap it up in a tarball, move the tarball, extract it, and
> wallah - permissions that never get borked.  Perhaps not as graceful as
> having rsync do it all, but whenever I've mirrored file and filesystems with
> files owned by root and containing setuid binaries or very restrictive files
> like the sudoers file, tar has preserved permissions the most faithfully for
> me.
>
> If you're having trouble coaxing rsync into doing the right thing, you could
> also wrap the rsync in a script, use rsync to move the bits, and have your
> script enforce permissions with chmods and chowns and chgrps after the
> rsync.
>
> Maybe you're not running an enterprise environment, but the "super-slick
> professional way" to mirror your sudoers file would be to manage it in
> subversion or something and distribute it with cfengine.  That might be
> overkill for you, but it could be a fun experiment. :)  Some links you might
> peruse:
>
> http://en.wikipedia.org/wiki/Comparison_of_open_source_configuration_management_software
> http://www.cfengine.org/pages/manual_guides
> http://watson-wilson.ca/blog/cfcookbook.html   (Search for sudoers on this
> page)
>
> -Rob
>
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> tclug-list at mn-linux.org
> http://mailman.mn-linux.org/mailman/listinfo/tclug-list
>
>