RPM

chmod failure when using --setugids

Bug #651567 reported by Jeff Johnson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
RPM
New
Undecided
Unassigned
Fedora
Fix Released
Low

Bug Description

tracker

Tags: options rhel
Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Description of problem:
if you try to restore an rpm to its original permissions using --setperms, rpm
exists with a chmod failure.

Version-Release number of selected component (if applicable):
rpm-4.4.2-47.el5.x86_64

How reproducible:
Always

Steps to Reproduce:
1. install package
2. run rpm --setperms packagename
3. watch errors

Actual results:
On each file, rpm throws a chmod error similar to the one below (for httpd)
chmod: invalid mode: `0100644'
Try `chmod --help' for more information.
chmod: invalid mode: `0100644'
Try `chmod --help' for more information.
chmod: invalid mode: `0100644'
Try `chmod --help' for more information.

Expected results:
rpm properly resets permissions to default state.

Additional info:

This is a very useful feature when attempting to repair a system, and should be
fixed.

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

Appears I spoke too soon. This appears to be more because of the use of
--setugids, not --setperms. --setperms works as advertised. It's --setuigids
which fails with the errors listed above.

Revision history for this message
In , Jim (jim-redhat-bugs) wrote :

UGH... STILL speaking too soon.

Individually each command succeeds.

rpm --setperms httpd ; this succeeds
rpm --setugids httpd ; this succeeds
rpm --setperms --setugids httpd ; this fails with the error chmod: invalid mode:
`0100644'

rpm --setuigids --setperms httpd ; apparently command order matters. This fails
with an incremented (one for each file) list of:
sh: line 356: ch: command not found
sh: line 357: ch: command not found
sh: line 358: ch: command not found
sh: line 359: ch: command not found

It would seem that this is something minor and not escaped properly, though I'm
not sure where exactly.

Jeff Johnson (n3npq)
tags: added: options rhel
Revision history for this message
In , Panu (panu-redhat-bugs) wrote :

Turns out this has gotten fixed a long time ago in the rebase to rpm 4.4.2.3:

https://rhn.redhat.com/errata/RHBA-2009-0079.html

Changed in fedora:
importance: Unknown → Low
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.