Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1590649

Summary: rcp transfer fails with rcmd: socket: Permission denied
Product: Red Hat Enterprise Linux 7 Reporter: Ramesh Sahoo <rsahoo>
Component: rshAssignee: Michal Ruprich <mruprich>
Status: CLOSED NOTABUG QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.5CC: lopresti, sbalasub
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-12-18 14:36:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1630905, 1709724, 1757052, 1780662    
Attachments:
Description Flags
rcp strace non root account
none
rcp strace from root user account none

Description Ramesh Sahoo 2018-06-13 06:33:57 UTC
Created attachment 1450799 [details]
rcp strace non root account

Description of problem:
In RHEL environment rcp fails with following error. 

rcmd: socket: Permission denied


I've attached strace from non-root and root user separately for review. 

 
Version-Release number of selected component (if applicable):

# rpm -qa | grep rsh
rsh-0.17-76.el7_1.1.x86_64

Steps to Reproduce:
1.Install rsh server on one machine. 
  # yum install rsh-server rsh -y 

2. Start service 
   # systemctl start rsh.socket
   # systemctl start rlogin.socket
   # systemctl start rexec.socket

3. On client machine install only rsh package which provides rcp command. 
   # yum install rsh 

4. On the client machine create ~/.rhosts file and add rcp server info. Following is my sample. 

  $ cat .rhosts 
  10.74.253.12 test  <<< 10.74.253.12 is my rcp server

5. Test rcp 
   $ rcp file.txt 10.74.253.12:/tmp/


Actual results:

19537 11:52:40 close(3)                 = 0 <0.000024>
19537 11:52:40 write(2, "rcmd: socket: Permission denied\n", 32) = 32 <0.000148>
19537 11:52:40 rt_sigprocmask(SIG_SETMASK, [], [URG], 8) = 0 <0.000012>
19537 11:52:40 exit_group(1)            = ?
19537 11:52:40 +++ exited with 1 +++


Expected results:

File transfer must proceed.

Comment 2 Ramesh Sahoo 2018-06-13 06:35:35 UTC
Created attachment 1450800 [details]
rcp strace from root user account

Comment 14 Patrick J. LoPresti 2022-11-20 16:11:45 UTC
We had the same issue. For us, it was due to rsh attempting to bind to a privileged port (< 1024). Enabling the set-UID bit *or* enabling cap_net_bind_service on /usr/bin/rsh works around the problem (cf. https://cwiki.apache.org/confluence/display/httpd/NonRootPortBinding).

Comment 15 Red Hat Bugzilla 2023-09-18 00:13:52 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days