Operating System - HP-UX
1834513 Members
2287 Online
110068 Solutions
New Discussion

Re: rcp Problem - Apparrent InConsistency

 
SOLVED
Go to solution
Bill Brutzman
Frequent Advisor

rcp Problem - Apparrent InConsistency

rcp works on one folder but not the other.

When I run rcp (from a script)... on the server named "sherman" to the server named "emily"

$ rcp -r -p /u2/SOFTWARE emily:/u2/

I get the following errors...

rcp: can't set times on /u2//SOFTWARE/HOP.BP/HOP.R33: Not owner
rcp: can't set times on /u2//SOFTWARE/HOP.BP/SUB.HOP.MAIN.NOWS.R33: Not owner
rcp: /u2//SOFTWARE/HOP.BP/PACK.SLIP.EDIT.R1: Permission denied
rcp: protocol screwup: unexpected
rcp: lost connection

*---------------------------------------------
However, when I run

rcp -r -p /u2/METAL emily:/u2/

it works ok...

*---------------------------------------------

I am logging as "yogi" to do the rcp script.
On both servers, yogi is a member of the "users" group.

*---------------------------------------------
On sherman...

#pwd
/u2/METAL
#ll
-rw-rwxr-x 1 root users

# pwd
/u2/SOFTWARE/HOP.BP
-rwxrwxr-x 1 root users

*----------------------------------------------
On emily...

# pwd
/u2/METAL
#ll
-rwxrwxr-x 1 yogi users

# pwd
/u2/SOFTWARE/HOP.BP
#ll
-rwxrwxr-x 1 root users HOP.R33
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: rcp Problem - Apparrent InConsistency

The biggest difference I see is that the owner does not have search permission on sherman:/u2/METAL.
If it ain't broke, I can fix that.
Bill Brutzman
Frequent Advisor

Re: rcp Problem - Apparrent InConsistency

The METAL thing works; the SOFTWARE thing does not.

I (manually) sync'd server times using the date command.
A. Clay Stephenson
Acclaimed Contributor

Re: rcp Problem - Apparrent InConsistency

I misread your ll outputs, you really need to examine the directory permissions.

do an ls -la on each of the directories and the problem should be obvious.

Manually syncing the servers using the date command is a recipe for OS confusion. Setting clocks backwards can be very bad -- especially for databases and makefiles and utilities like rdist/rsync. Setup NTP instead although time is not your direct problem here.

The "rcp: protocol screwup" message can result from permission, environment, or path problems.
If it ain't broke, I can fix that.
Bill Brutzman
Frequent Advisor

Re: rcp Problem - Apparrent InConsistency

1. Above the '//' in /u2//SOFTWARE bothers me.

2. The old emily server is only used for backing up in case sherman goes down. Thus, I cannot get too excited about manually tweaking daylight time.

Bill Brutzman
Frequent Advisor

Re: rcp Problem - Apparrent InConsistency

Find attached an easy-to-read one-page summary of ll directory contents.
A. Clay Stephenson
Acclaimed Contributor

Re: rcp Problem - Apparrent InConsistency

Have a look at &EDS&; it's a regular file and it's a directory. It's probably a good idea to quote filesnames as well because the & is special to the shell. If you happened to have filenames like "&Test File &" that could trigger unexpected behavior.
If it ain't broke, I can fix that.