Operating System - Linux
1751894 Members
5259 Online
108783 Solutions
New Discussion юеВ

copying the .rhosts file to a remote directory

 
SOLVED
Go to solution
Andrew Kaplan
Super Advisor

copying the .rhosts file to a remote directory

Hi there --

I wrote a script that copies several files, including .rhosts, to a remote directory. When the script is run, the following error message appears on-screen:

Quote:
cp: cannot create regular file '
The line in the script that is involved with copying the .rhosts file is shown below:

Code:
cp -pr /root/.rhosts

The script is run by the root user. What command syntax should I use to be able to copy .rhosts to the remote directory?
A Journey In The Quest Of Knowledge
4 REPLIES 4
Alexander Chuzhoy
Honored Contributor
Solution

Re: copying the .rhosts file to a remote directory

Looks like you don't have write permission on .
Andrew Kaplan
Super Advisor

Re: copying the .rhosts file to a remote directory

That did it. Thanks.
A Journey In The Quest Of Knowledge
Ivan Ferreira
Honored Contributor

Re: copying the .rhosts file to a remote directory

Hi Andrew, please give thanks by asigning points. According to your profile, you haven't do that in a long time =)
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
TwoProc
Honored Contributor

Re: copying the .rhosts file to a remote directory

Andrew, this is not at all what you're asking about, but I'm going to throw it out to you anyways... just 'cause I noticed that you're using it...

You shouldn't be using rhost commands anymore - you need to install and configure ssh. It's much more secure, and not packet sniffable for passwords and all other commands like rhost command is.

Time to upgrade to ssh.
We are the people our parents warned us about --Jimmy Buffett