Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remote copy looses ownership 4.3.3

Status
Not open for further replies.

Deak

Technical User
Nov 9, 2001
101
US
I have setup the /.rhosts, /etc/hosts.equiv & the hosts file to contain the information of 2 box's I have networked together However when I use the rcp -rp to retain permissions on the files I move across are not retaining the permissions. Should be owner dev:medgrp but its changeing it to root:system owner. Does anyone know specifically what allows the retain permission or what I am missing?
/etc/hosts
# lines are allowed.

# Internet Address Hostname # Comments
# 192.9.200.1 net0sample # ethernet name/address
# 128.100.0.1 token0sample # token ring name/address
# 10.2.0.2 x25sample # x.25 name/address
127.0.0.1 loopback localhost # loopback (lo0) name/address
# 127.10.1.1 m5312
#172.20.1.240 m5312
172.20.1.2 old
172.20.1.1 m5312
#
/etc/hosts.equiv
# host user allows access to user on host
# + user allows access to user on any host
# host -user denies access to user on host
# -host denies access to all users on host
# -@group denies access to all users on hosts in group
# +@group1 +@group2 allows access to users in group2 on hosts in group1
old
m5312

/.rhosts
m5312 root
old root
#

 
Does the owner:group exist on both machines?

--
| Mike Nixon
| Unix Admin
|
----------------------------
 
Hi Deak

rcp command with flag p or without does the same function .It is true...
Whoever runs the rcp command for remote copying will own the file on local host.The original owner(group) of the file won't be preserved.The mode and timestamp of the file access will be preserved.
In next step use chown command to change the ownership of root to dev(in this scenerio)

But while using cp command with -p flag will certainly retain ownership(user/group),mode and timestamp ( all these 3 attributes)

Hi Mrn : owner and group existing on both machines do not matter...

sushveer
IBM certified specialist-p-series AIX5L System Administration
AIX/SOLARIS/WEBSPHERE-MQ/TIVOLI Administrator
 
Sushveer is this telling me that no matter what switchs I use I wont move a file across & keep the same owner;
drwxrwxrwx 2 dev medgrp 512 Jul 17 12:42 HOLD
drwxrwxr-x 3 dev medgrp 512 Jun 12 2001 MF
drwxrwxrwx 2 dev medgrp 5632 Jul 17 12:50 MF01
drwxrwxrwx 2 dev medgrp 5120 Jul 17 14:13 MF02
I was looking to keep the dev & medgrp as seen above as well as the permissions to the files.
 
i avoided this irritation by scripting some tar commands, for example:

#!/bin/ksh
tar -cvf/targetdir/file.tar /sourcedir
rcp -p /targetdir/file.tar otherhost:/remotedir/file.tar
rsh otherhost 'tar -xvf/remotedir/file.tar'

i scripted this because i was moving several fs between several hosts. you will need space for the tar file of course, and i left out the cleanup lines.

IBM Certified -- AIX 4.3 Obfuscation
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top