[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

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

Posted on 2016-07-25
10
Medium Priority
?
2,431 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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 2000 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

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…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
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.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

650 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