Solved

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

Posted on 2016-07-25
10
206 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to install Ubuntu 16 in DELL venue 8 pro 20 124
is my large folder zipped corrupted 4 65
centos linux 65 123
linux 13 41
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

816 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now