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@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.
On Tue, May 20, 2008 at 12:15 PM, James B. Byrne byrnejb@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@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" ?
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.
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@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,
On Wed, May 21, 2008 at 8:37 AM, James B. Byrne byrnejb@harte-lyne.ca wrote:
This indeed turned out to be an SELinux policy problem which I have since resolved.
Whoa, whoa, whoa, nice shooting, Tex! (Ghostbusters)
Not so fast - please post the solution, too, for posterity (and those of us who don't use SELinux but might, someday, in the not too distant far future...).
Thanks.
mhr