Bug 474146 - rhnpush fails if /var/satellite does not exist
rhnpush fails if /var/satellite does not exist
Product: Spacewalk
Classification: Community
Component: Installation (Show other bugs)
All Linux
high Severity low
: ---
: ---
Assigned To: Jan Pazdziora
Red Hat Satellite QA List
Depends On:
Blocks: space04
  Show dependency treegraph
Reported: 2008-12-02 09:23 EST by Jan Pazdziora
Modified: 2009-01-22 11:30 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-22 11:30:58 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2008-12-02 09:23:57 EST
+++ This bug was initially created as a clone of Bug #451721 +++

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 password --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:

--- Additional comment from mmccune@redhat.com on 2008-06-27 15:39:19 EDT ---


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

Then try rhnpush again.

--- Additional comment from cperry@redhat.com on 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. 


--- Additional comment from bperkins@redhat.com on 2008-09-18 15:35:22 EDT ---

*** Bug 436097 has been marked as a duplicate of this bug. ***

--- Additional comment from bperkins@redhat.com on 2008-11-03 22:25:17 EDT ---

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).

--- Additional comment from jpazdziora@redhat.com on 2008-12-02 08:47:30 EDT ---

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.

--- Additional comment from jpazdziora@redhat.com on 2008-12-02 09:22:16 EDT ---

I'm taking this bugzilla.

My plan is to create the directory in spacewalk-setup / install/stage2.pl, not in the satellite-sync.
Comment 1 Jan Pazdziora 2008-12-10 04:40:49 EST
Changes committed to git: 3880674c51248f4ef18e346e22c28b93bb31c499, 3eedd23edd8890a688c420479a89c61ec6f1c6c2, and 543b3270896bcf346f58f5505e4229c20f8f048a.
Comment 2 Miroslav Suchý 2009-01-15 09:17:24 EST
# ls -ld /var/satellite/
drwxr-xr-x 3 apache root 4096 Jan 15 16:23 /var/satellite/
On both brand new installation and even upgrade from old one is created /var/satellite

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