I have two hosts which have their respective keys loaded into each others .ssh/authorized-keys2 file for root. I want to move a directory tree from one host to the other via rsync to maintain a shadow structure of the application provided on the main host. This is the relevant part of the command: rsync -avz --rsh=ssh --delete-after /var/data/pas-redmine root at inet01.mississauga.harte-lyne.ca:/var/data The connection is made and a good deal of material is successfully transferred. I am however getting a number of permission errors: rsync: readlink "/var/data/pas-redmine/lib/tabular_form_builder.rb" failed: Permission denied (13) rsync: readlink "/var/data/pas-redmine/lib/redmine.rb" failed: Permission denied (13) rsync: readlink "/var/data/pas-redmine/lib/diff.rb" failed: Permission denied (13) and many more: The permissions and owner for these are: -rw-r--r-- 1 pas pas 2341 May 9 13:57 \ /var/data/pas-redmine/lib/tabular_form_builder.rb -rw-r--r-- 1 pas pas 7934 May 9 13:57 \ /var/data/pas-redmine/lib/redmine.rb -rw-r--r-- 1 pas pas 5602 May 9 13:57 \ /var/data/pas-redmine/lib/diff.rb ... The host application directory structure is a checked out svn repository, but some of the files that are giving errors are created locally such as the database dump file. I am at a loss to explain this since the rsync and ssh user, so far as I can tell, is root and this, so far as I understand, should allow unrestricted access to the files regardless of the ownership or permissions. If someone can clue me in as to what I am misapprehending here I would be much appreciative. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
On Tue, May 20, 2008 at 12:15 PM, James B. Byrne <byrnejb at harte-lyne.ca> wrote:> I have two hosts which have their respective keys loaded into each others > .ssh/authorized-keys2 file for root. I want to move a directory tree from > one > host to the other via rsync to maintain a shadow structure of the > application > provided on the main host. > > This is the relevant part of the command: > > rsync -avz --rsh=ssh --delete-after /var/data/pas-redmine > root at inet01.mississauga.harte-lyne.ca:/var/data > > The connection is made and a good deal of material is successfully > transferred. I am however getting a number of permission errors: > > rsync: readlink "/var/data/pas-redmine/lib/tabular_form_builder.rb" failed: > Permission denied (13) > rsync: readlink "/var/data/pas-redmine/lib/redmine.rb" failed: Permission > denied (13) > rsync: readlink "/var/data/pas-redmine/lib/diff.rb" failed: Permission > denied > (13)Maybe /var/data/pas-redmine is nfs mounted (or a remote filesystem of some kind)... Can you "cat /var/data/pas-redmine/lib/tabular_form_builder.rb > /dev/null" ? -- Marcelo "?No ser? acaso que ?sta vida moderna est? teniendo m?s de moderna que de vida?" (Mafalda) -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20080520/2ce56acd/attachment-0005.html>
On Tue, May 20, 2008 11:15, James B. Byrne wrote:> The connection is made and a good deal of material is successfully > transferred. I am however getting a number of permission errors:It appears that this may be an SELinux problem. -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
James B. Byrne wrote:> I have two hosts which have their respective keys loaded into each > others .ssh/authorized-keys2 file for root. I want to move a > directory tree from one host to the other via rsync to maintain a > shadow structure of the application provided on the main host. > > This is the relevant part of the command: > > rsync -avz --rsh=ssh --delete-after /var/data/pas-redmine > root at inet01.mississauga.harte-lyne.ca:/var/data > > The connection is made and a good deal of material is successfully > transferred. I am however getting a number of permission errors: > > rsync: readlink "/var/data/pas-redmine/lib/tabular_form_builder.rb" > failed: Permission denied (13) > rsync: readlink "/var/data/pas-redmine/lib/redmine.rb" failed: > Permission denied (13) > rsync: readlink "/var/data/pas-redmine/lib/diff.rb" failed: > Permission denied (13) > > and many more: > > > The permissions and owner for these are: > -rw-r--r-- 1 pas pas 2341 May 9 13:57 \ > /var/data/pas-redmine/lib/tabular_form_builder.rb > -rw-r--r-- 1 pas pas 7934 May 9 13:57 \ > /var/data/pas-redmine/lib/redmine.rb > -rw-r--r-- 1 pas pas 5602 May 9 13:57 \ > /var/data/pas-redmine/lib/diff.rb > ... > > > The host application directory structure is a checked out svn > repository, but some of the files that are giving errors are created > locally such as the database dump file. I am at a loss to explain > this since the rsync and ssh user, so far as I can tell, is root and > this, so far as I understand, should allow unrestricted access to the > files regardless of the ownership or permissions. > > If someone can clue me in as to what I am misapprehending here I > would be much appreciative.Maybe you need to specify the uid and gid for rsyncd on the server. If it's defaulting to nobody, that could be your problem. uid The "uid" option specifies the user name or user ID that file transfers to and from that module should take place as when the daemon was run as root. In combination with the "gid" option this determines what file permissions are available. The default is uid -2, which is normally the user "nobody". gid The "gid" option specifies the group name or group ID that file transfers to and from that module should take place as when the daemon was run as root. This complements the "uid" option. The default is gid -2, which is normally the group "nobody". For one machine that I'm backing up via rsync, my /etc/rsyncd.conf looks like this: [backup] path = /backupdir hosts allow = xx.xx.xx.xx auth users = alloweduser secrets file = /etc/rsyncd.secrets uid = 0 gid = 0 -- Bowie
On Tue, May 20, 2008 11:15, James B. Byrne wrote:> This is the relevant part of the command: > > rsync -avz --rsh=ssh --delete-after /var/data/pas-redmine > root at inet01.mississauga.harte-lyne.ca:/var/data > > The connection is made and a good deal of material is successfully > transferred. I am however getting a number of permission errors: > > rsync: readlink "/var/data/pas-redmine/lib/tabular_form_builder.rb" failed: > Permission denied (13) > rsync: readlink "/var/data/pas-redmine/lib/redmine.rb" failed: Permission > denied (13) > rsync: readlink "/var/data/pas-redmine/lib/diff.rb" failed: Permission denied > (13) > > and many more:This indeed turned out to be an SELinux policy problem which I have since resolved. Thanks for the suggestions. Sincerely, -- *** E-Mail is NOT a SECURE channel *** James B. Byrne mailto:ByrneJB at Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Seemingly Similar Threads
- SELinux is preventing /usr/bin/chcon "mac_admin" access
- [Job Offer] Redmine dev for 4 month contract in Toronto, immediately
- OT: Web "Project" type software
- CentOS-5.10 Sendmail STARTTLS error
- rake db:migrate_plugins RAILS_ENV=production fails with "no such file to load -- initializer"