Bug 463240 - Internal Server / Permission Denied Error while adding or removing packages after 0.1 to 0.2 update
Summary: Internal Server / Permission Denied Error while adding or removing packages a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Installation
Version: 0.2
Hardware: All
OS: Linux
medium
low
Target Milestone: ---
Assignee: Pradeep Kilambi
QA Contact: Jesus M. Rodriguez
URL:
Whiteboard:
Depends On:
Blocks: space05
TreeView+ depends on / blocked
 
Reported: 2008-09-22 17:11 UTC by Brian Beaudoin
Modified: 2009-09-17 07:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-09-17 07:08:19 UTC
Embargoed:


Attachments (Terms of Use)

Description Brian Beaudoin 2008-09-22 17:11:41 UTC
Description of problem:

After updating from Spacewalk version 0.1 to 0.2 using the instructions at https://hosted.fedoraproject.org/spacewalk/wiki/HowToUpgrade, "Permission denied" errors were received when attempting to upload new packages to the Spacewalk server.

Steps to Reproduce:
1.  Install Spacewalk 0.1
2.  Upload a good number of packages using "rhnpush"
3.  Upgrade (https://hosted.fedoraproject.org/spacewalk/wiki/HowToUpgrade)
4.  Upload a package whose md5sum matches the first three characters of another packages's md5sum

Expected Result:  Package will be uploaded without issue
  
Actual Result:

Internal server error 500 Internal Server Error
Error pushing updates/packages/tomcat5-admin-webapps-5.5.23-0jpp.7.el5_2.1.i386.rpm: Error 500Error Message:
    Package upload failed: [Errno 13] Permission denied: '/var/satellite/redhat/1/1cc/tomcat5-admin-webapps'
Error Class Code: 50
Error Class Info: Invalid information uploaded to the server (500)
Waiting 3 seconds and trying again...
[
...
]
Giving up after 3 attempts

Additional info:

It appears the issue is caused by incorrect ownership (root:root) of the directories between /var/satellite/redhat/1/ and the package.  The package itself was owned by apache:apache and both /var/satellite/redhat/1/ and /var/satellite/redhat/ were owned by apache:apache.

Running the command "chown -hR apache:apache /var/satellite/redhat/" corrected this for me.

Comment 1 Jesus M. Rodriguez 2009-01-17 01:37:16 UTC
Let's make sure the upgrade scripts retain proper permissions.

Comment 2 Jan Pazdziora (Red Hat) 2009-01-19 10:58:19 UTC
Prad,

could you review update-packages and/or updatePackages.py and retain the permissions / ownership?

Thanks, Jan

Comment 3 Pradeep Kilambi 2009-02-19 22:17:33 UTC
the update script always retains the permissions on that directory:

# update-packages --db user/password@sid
Connecting to user/password@sid
         ________________________________________
standby: ######################################## - Complete!
Transaction Committed! 
# ls -l /var/satellite/
total 16
drwxr-xr-x 4 apache root 4096 Feb 11 16:40 redhat
drwxr-xr-x 3 apache root 4096 Feb 12 16:35 rhn

Comment 4 Jesus M. Rodriguez 2009-04-14 14:11:34 UTC
Spacewalk 0.5 released.

Comment 5 Miroslav Suchý 2009-09-17 07:08:19 UTC
Spacewalk 0.5 has been released for long time ago.


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