Avatar of mac_g
mac_g
Flag for Saudi Arabia asked on

Linux : can't create transaction lock on rpm.lock (Permission denied)

please advise the fix
========
[bkp@dba ~]$ rpm -Uvh AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm
error: can't create transaction lock on /var/lib/rpm/.rpm.lock (Permission denied)


[bkp@dba01 ~]$ id
uid=1102(bkp) gid=0(root) groups=0(root)
=====
LinuxLinux DistributionsLinux OS DevUnix OS

Avatar of undefined
Last Comment
Sudeep Sharma

8/22/2022 - Mon
Sudeep Sharma

use su -  and then root's password to try again.

Thanks,
Sudeep
mac_g

ASKER
am using same account which is as part of root.

with root it is working ..

this bkp user use by backup admin... I want to use that account

please advice
Sudeep Sharma

could you list the permissions on the file which has the error and post the output of the following

ls -la /var/lib/rpm/.rpm.lock

Sudeep
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
mac_g

ASKER
-rwxr-xr-x 1 bkp oinstall 74050510 Jul 25 12:30 AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm
mac_g

ASKER
-rw-r--r--. 1 root root 0 Feb  2  2014 /var/lib/rpm/.rpm.lock
Sudeep Sharma

As you could see that only user root has the write permission on the file.

bkp user is member of the Group root and group members doesn't have the write permissions on the /var/lib/rpm/.rpm.lock

You should try sudo rpm -Uvh AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm instead.

Make sure user bkp has the sudo access.

Thanks,
Sudeep
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
mac_g

ASKER
]$ sudo rpm -Uvh AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm

[sudo] password for bkp:
bkp is not in the sudoers file.  This incident will be reported.

???
Sudeep Sharma

Well I clearly mentioned in my previous response to make sure that bkp user has sudo access.


Provide sudo access first to bkp and then run the same command again.

Thanks,
Sudeep
mac_g

ASKER
thanks ..

can u please advice steps how to provide  sudo access to bkp user ?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
ASKER CERTIFIED SOLUTION
Sudeep Sharma

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.