From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 Description of problem: There seems to be a bug in the rpm shipped with FC3. Namely, when I run it as a regular user, with the --root option, I get the the: error: can't create transaction lock But it works just fine as root: [dimi@dimi ~]$ rpm --root /home/dimi/dev/kogaion/virtualroot --initdb error: can't create transaction lock [dimi@dimi ~]$ su Password: [root@dimi ~]# rpm --root /home/dimi/dev/kogaion/virtualroot --initdb I quick google for the problem reveals that a very similar bug has been fixed not long ago (in RPM version 4.3.1) for the non-root 'rpm --test' case: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119783 It looks as if the --root case have been missed by that fixed. Version-Release number of selected component (if applicable): rpm-4.3.2-21 How reproducible: Always Steps to Reproduce: 1. simply run "rpm --root /tmp/virtualroot --initdb" as non-root Actual Results: error: can't create transaction lock Expected Results: no error result, it should just work. Additional info: similar bug: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119783
Running rpm --root as non-root user makes no sense, there is a chroot(2) call that is root-only.
hi, i am using FC3 and I need to do "rpm --initdb" with a non-root user. i get the following error: can't create transaction lock. i tried to find a fix on google but i failed to find one. as i mentioned before i'm using FC3 and i RPM 4.3.2 and i tried this with RPM 4.3.3 also, the result was the same. can you please help me... thx
Hi, just confirming that this is a problem for me as well, but I found a workaround for those who are willing to sacrifice some security... ralphw@rhessql5:~> rpm --dbpath `pwd`/rpm --initdb error: can't create transaction lock [omitted strace rpm --dbpath `pwd`/rpm --initdb 2>&1 |tail -100 that discovered permission denied on /var/lock/rpm/transaction] ralphw@rhessql5:~> su - Password: :- chmod 0666 /var/lock/rpm/transaction :- ls -l /var/lock/rpm/transaction -rw-rw-rw- 1 root root 0 Jul 1 20:52 /var/lock/rpm/transaction :- exit ralphw@rhessql5:~> rpm --dbpath `pwd`/rpm --initdb ralphw@rhessql5:~> rpm --dbpath `pwd`/rpm --prefix `pwd` --nodeps -i *.rpm ralphw@rhessql5:~>
Sorry, I forgot to specify that I am on a Red Hat Enterprise Server, uname -a: Linux rhessql5.funk.com 2.6.9-5.ELsmp #1 SMP Wed Jan 5 19:30:39 EST 2005 i686 i686 i386 GNU/Linux