trying normal rcp (/usr/bin/rcp) Permission denied.
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Forgoing all the reasons to not use rcp/rsh etc, you probably need to supply some more information about what you've tried.
For instance, when you say permission denied, do you mean you can't execute rcp as a normal user, or that the authentication fails? If you just can't execute rcp, change the permissions. If the authentication fails, then it could be any number of reasons. Are accounts set up properly on all machines, together with .k5login/ hosts.equiv files etc. Does rsh work between machines?
Alright, your problem is most likely a mapping of usernames. I'm guessing that on the remote machines, you've got a .rhosts file containing a list of valid ip addresses. This will probably work fine for the 'root' and 'oracle' accounts, since these will exist on both machines. However, it's likely that your local username isn't valid on the remote machines. To fix it, you can add a line to the .rhosts file. For instance, if you want user 'geoff' (which is valid on your local machine, with ip address 192.168.1.32) to be able to copy things as the 'oracle' user on a remote machine, add the following to the .rhosts in the remote oracle user's home directory:
However, as I hinted at before, DON'T USE RCP/RSH/RLOGIN. Please. Especially not across the internet. Change to using ssh/scp instead. It's much more secure.
Have you mounted /u01 with acl?
mount -l |grep "/u01"
Can you check (or paste output) for the permission for /u01/app/oracle/temp with getfacl if you have acl on it? It could have been the reason that acl might have set just only for one of your oracle user to deny writing there.
I know this is an old post but as i have just managed to resolve this problem for myself i thought id post my solution.
Beadyallens response was exactly what was the problem with my issue.
My scenario.... i have ServerA.doodle.com that contained a file called /transfers/TestA.
I also have ServerB.doodle.com where i wanted to copy the file to as user bob.
A user called bob needed to log onto ServerB and copy the TestA file from ServerA.
To get this to work....
On ServerA, I had to create a .rhosts file in the home directory for bob (/home/bob/.rhosts) and add the below line....
This line allows bob on ServerB to access and copy files from ServerA
Then I logged onto ServerB as bob and ran the rcp command as below:-
rcp ServerA:/transfers/TestA /home/bob/
The main problem i had which had me going round in circles was that i never had the correct hostname of ServerA in the .rhosts file.
This needs to be input as your server resolves it.
i.e. I originally thought that because in my hosts file i had the nickname as ServerA it would figure it out, so i had...
After amending this to the below it worked fine.