LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-02-2011, 04:50 AM   #1
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Rep: Reputation: 4
Centos grant read access for rSync


Hi,

I am trying to setup a Rsync backup method.
I have multiple files and folders all OWNED by different users.
Now I can read the files as root.
But I want to make a user for RSYNC that can ONLY read all these files for copying them across.

BTW, I am following this HOW to :
http://www.linuxquestions.org/linux/...etween_servers

It requires to create a non password login and I dont want to do that with the root user !

I have tried to create a new user and use 'setfacl' :
setfacl -m u:someuser:r /var/test

But when I su to 'someuser' I cannot copy the files to my homedir. So I think it wont work for rsync also.

Please help me.
 
Old 05-02-2011, 05:08 AM   #2
droyden
Member
 
Registered: Feb 2007
Location: UK
Posts: 150

Rep: Reputation: 19
Look at using the rsync daemon which will run as root as a process and listen for rsync requests.
 
Old 05-02-2011, 05:44 AM   #3
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Hi,

Is it possible to rsync from the SOURCE machine itself ?

The guide I posted above has this from the backup server :
rsync -e ssh -avzn --delete-after user@liveserver:/home/httpd /home

Cant I do this on the source server ? :
rsync -e ssh -avz --delete-after /home user@liveserver:/home/httpd

I will create the public key in a way that the source machine can access the mirror machine without the password.
With this method the source machine is always safe as root login is not compromised.

Waiting for your reply.
 
Old 05-02-2011, 11:23 AM   #4
droyden
Member
 
Registered: Feb 2007
Location: UK
Posts: 150

Rep: Reputation: 19
The method u are using atm rsyncs using ssh, where as u would be rsyncing using the rsyncd (u can tunnel this if you want the crypto)
 
Old 05-03-2011, 01:57 AM   #5
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Hi,

I have not started the rsyncd.
Is the following safe :
rsync -e ssh -avz --delete-after /home user@liveserver:/home/httpd
 
Old 05-03-2011, 07:15 AM   #6
droyden
Member
 
Registered: Feb 2007
Location: UK
Posts: 150

Rep: Reputation: 19
You can run that as root on the source and it will be fine, ownership & permissions will obviously not be replicated
 
Old 05-03-2011, 11:47 PM   #7
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Hi,

I tried it and the permissions on the Backup server are replicated.
But since the account doesnt exist there it shows the owner as the USER and GROUP ID itself.
Is that wrong ?
 
Old 05-04-2011, 01:34 AM   #8
droyden
Member
 
Registered: Feb 2007
Location: UK
Posts: 150

Rep: Reputation: 19
Nah that is ok, aslong as its recording the uid/gid.
 
Old 05-04-2011, 11:11 PM   #9
vzxen
Member
 
Registered: Jul 2010
Posts: 126

Original Poster
Rep: Reputation: 4
Ok thanks.
 
0 members found this post helpful.
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grant Apache read access to a file? damgar Linux - Server 1 09-22-2010 11:13 AM
Grant certain group read-only access to /var directory loadedmind Fedora 5 06-14-2010 10:16 AM
Unifying permissions between two servers (CentOS + Webmin/CentOs +Cpanel) and rsync d60eba Linux - Server 1 01-01-2010 12:55 PM
How do I grant Read Permissons on a USB Hard Drive markgmiller Linux - Newbie 2 04-09-2009 10:12 PM
Grant Access Mercurius Slackware 18 12-10-2006 12:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration