Bug 159507 - rpm --initdb error: can't create transaction lock as non-root user.
rpm --initdb error: can't create transaction lock as non-root user.
Product: Fedora
Classification: Fedora
Component: rpm (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Paul Nasrat
Mike McLean
Depends On:
  Show dependency treegraph
Reported: 2005-06-03 04:59 EDT by Stephen Rankin
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-09-18 08:50:56 EDT
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 Stephen Rankin 2005-06-03 04:59:36 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
rpm --initdb error: can't create transaction lock as non-root user.

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

How reproducible:

Steps to Reproduce:
1. setup ~/.rpmmacros as non-root user and set %_topdir, %_tmppath and %_dbpath.
2. Create correct directory structure under %_topdir.
3. run rpm --initdb

Actual Results:  error: can't create transaction lock

Expected Results:  Initiate rpm database.

Additional info:

Works on Red Hat Enterprise Linux WS release 3 (Taroon Update 5) with rpm-4.2.3-21_nonptl using same setup.
Comment 1 Henry S. Thompson 2005-09-18 08:43:24 EDT
So this did use to work under RH9, and is important functionality for those of 
use who have centrally managed machines for which we don't have root access.  
It's still valuable to be able to do private rpm installs, and using your own 
dbpath used to allow that.
Comment 2 Jeff Johnson 2005-09-18 08:49:34 EDT
The path to the file is configurable:
    %_rpmlock_path %{_dbpath}/__db.000
in rpm-4.4.2. Reconfigure, put the file in a directory
where you have permission to create a write the path
used for fcntl locking.

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