Re: can't copy file

Go to solution
Regular Advisor

can't copy file

When I " rcp -p " file from host A to host B , it will pop the below message , could suggest what is the reason ? thx

rcp: can't set times on
melvyn burnard
Honored Contributor

Re: can't copy file

what OS version are you using on both nodes?
does it work the other way around, i.e. from B to A?
My house is the bank's, my money the wife's, But my opinions belong to me, not HP!
Bharat Katkar
Honored Contributor

Re: can't copy file

-p is basically used to preserve time of modifications, owner/group etc of the file.
Now that it is saying "can't set times on" i suspect the date/time of the two servers.

May be the hostB date/time is behind the file modification time that is being copied.


You need to know a lot to actually know how little you know
Derek Whigham_1
Trusted Contributor

Re: can't copy file

Are you doing this as root or as another user?

Check the time on each box ntpq -p to see if they are timesync'd to the same location.

If the two times are very dirrerent this could be the problem
Divide and Conquer
Valued Contributor

Re: can't copy file


the date of the host A and host B ?

it possible tha the date of node B is incompatible to the date of host A

example :
node A date 25/08/2005
node B date 21/08/2005

date of file 25/08/2005

Honored Contributor

Re: can't copy file

That seems to be a permission problem. Does the user have write access on the directory where the file is copied to? If the file already existed and the user has write access to the file, it can overwrite the file. But because op the -p, rcp changes the access time of the file. These are stored in de inode, and to change the inode, one has to have write access on the directory.