Bug 427064

Summary: Enhance message when running rpm as non-root user
Product: [Fedora] Fedora Reporter: Rahul Sundaram <sundaram>
Component: rpmAssignee: Panu Matilainen <pmatilai>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: pnasrat, smohan
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-01 10:43:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rahul Sundaram 2007-12-30 19:55:51 UTC
Description of problem:

The message that a user gets when running rpm as non-root user can be improved

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


How reproducible:


Steps to Reproduce:
1. rpm -e <foo> as non-root user

  
Actual results:

You will get error: can't create transaction lock on /var/lib/rpm/__db.000

Expected results:

Something more nicer like "You need to be root to perform this command." which
is the output from yum.

Comment 1 Panu Matilainen 2008-04-01 10:43:03 UTC
Fixed upstream to log the reason too, so regular user would typically get:
error: can't create transaction lock on /var/lib/rpm/__db.000 (Permission denied)

Rpm doesn't require root for transaction etc locks, it just needs write
permissions to the directory so claiming root is required would be wrong.