This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 451721 - rhnpush fails if /var/satellite doesnot exist
rhnpush fails if /var/satellite doesnot exist
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Installer (Show other bugs)
unspecified
All Linux
low Severity low
: ---
: ---
Assigned To: Jan Pazdziora
Jeff Browning
:
: 436097 (view as bug list)
Depends On:
Blocks: 456985
  Show dependency treegraph
 
Reported: 2008-06-16 17:32 EDT by Partha Aji
Modified: 2009-09-10 16:25 EDT (History)
5 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-09-10 16:25:49 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Partha Aji 2008-06-16 17:32:42 EDT
Description of problem:
The server side component of rhnpush is unable to create /var/satellite folder
on its own since its run as an apache user who does not have create permissions
under /var. This for example can be an issue if some one tries to rhnpush a
package to a satellite before running satellite-sync.

Version-Release number of selected component (if applicable): noticed in 511, it
may have been prevalent in earlier versions also..

How reproducible: always


Steps to Reproduce: 
Many ways to reproduce this. One way
1. Install a satellite (don't run satellite-sync yet)
2.  rhnpush foo.rpm -uadmin -p redhat --nosig -v --server=https://localhost/APP

Actual results:

  Error pushing foo.rpm: Error 500Error Message:
    Package upload failed: [Errno 13] Permission denied: '/var/satellite'

Expected results:
No errors..

Another way to reproduce this is to  temporarily rename /var/satellite to
something else (/var/satellite-backup) and trying the same rhn push command...


Additional info:
Comment 1 Mike McCune 2008-06-27 15:39:19 EDT
WORKAROUND: 

mkdir /var/satellite
chown apache:root /var/satellite

Then try rhnpush again.
Comment 2 Clifford Perry 2008-09-02 13:17:11 EDT
Sounds like the installer should address this issue and not depend on python code for sat sync running as root needing to create the location correctly. 

Cliff
Comment 3 Brandon Perkins 2008-09-18 15:35:22 EDT
*** Bug 436097 has been marked as a duplicate of this bug. ***
Comment 4 Brandon Perkins 2008-11-03 22:25:17 EST
The problem is in:

_verifyPkgRepMountPoint in /usr/share/rhn/satellite_tools/satsync.py (or
equivalent in Spacewalk)

I think that if the directory doesn't exist, the mkdir should be in the spec for rhns-satellite-tools (or equivalent in Spacewalk).
Comment 5 Jan Pazdziora 2008-12-02 08:47:30 EST
Should _verifyPkgRepMountPoint create that directory at all? Shouldn't the code which puts the directory to /etc/rhn/rhn.conf also create that directory? I do not like it in the .spec either because you could change it in the answer file.
Comment 6 Jan Pazdziora 2008-12-02 09:22:16 EST
I'm taking this bugzilla.

My plan is to create the directory in spacewalk-setup / install/stage2.pl, not in the satellite-sync.
Comment 8 Jan Pazdziora 2008-12-10 04:42:54 EST
This bugzilla was addressed in upstream (Spacewalk), in bugzilla 474146.
Comment 9 Jan Pazdziora 2008-12-25 12:03:50 EST
With Satellite-5.3.0-RHEL5-re20081223.1 and Satellite-5.3.0-RHEL4-re20081223.2 composes available, moving ON_QA.
Comment 10 Jeff Browning 2009-03-04 16:27:10 EST
Verified fixed in Sat 530
Comment 11 Milan Zazrivec 2009-09-02 07:40:14 EDT
Latest stage iso, after fresh installation:

# ls -dl /var/satellite
drwxr-xr-x 3 apache root 4096 Sep  2 13:15 /var/satellite

RELEASE_PENDING
Comment 12 Brandon Perkins 2009-09-10 16:25:49 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2009-1434.html

Note You need to log in before you can comment on or make changes to this bug.