Solved

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

Posted on 2016-07-25
10
998 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 5
10 Comments
 
LVL 30

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 30

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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 

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 30

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 30

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 30

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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.:
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.

718 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