Solved

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

Posted on 2016-07-25
10
326 Views
Last Modified: 2016-07-27
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)
=====
0
Comment
Question by:mac_g
  • 5
  • 5
10 Comments
 
LVL 29

Expert Comment

by:Sudeep Sharma
ID: 41727450
use su -  and then root's password to try again.

Thanks,
Sudeep
0
 

Author Comment

by:mac_g
ID: 41727452
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
0
 
LVL 29

Expert Comment

by:Sudeep Sharma
ID: 41727461
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
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

Author Comment

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

Author Comment

by:mac_g
ID: 41727469
-rw-r--r--. 1 root root 0 Feb  2  2014 /var/lib/rpm/.rpm.lock
0
 
LVL 29

Expert Comment

by:Sudeep Sharma
ID: 41727480
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
0
 

Author Comment

by:mac_g
ID: 41727492
]$ 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.

???
0
 
LVL 29

Expert Comment

by:Sudeep Sharma
ID: 41727575
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
0
 

Author Comment

by:mac_g
ID: 41727584
thanks ..

can u please advice steps how to provide  sudo access to bkp user ?
0
 
LVL 29

Accepted Solution

by:
Sudeep Sharma earned 500 total points
ID: 41727891
With root login, type:
visudo

Find the following code:

## Allow root to run any commands anywhere
root ALL=(ALL) ALL

In this case, we’re granting root privileges to the user bkp . Add the following below that code:

bkp ALL=(ALL) ALL

Then exit and save the file with the command :wq

Sudeep
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question