• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3943
  • Last Modified:

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)
=====
0
mac_g
Asked:
mac_g
  • 5
  • 5
1 Solution
 
Sudeep SharmaTechnical DesignerCommented:
use su -  and then root's password to try again.

Thanks,
Sudeep
0
 
mac_gAdmin - Oracle Fusion Middleware suiteAuthor Commented:
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
 
Sudeep SharmaTechnical DesignerCommented:
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
Industry Leaders: 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!

 
mac_gAdmin - Oracle Fusion Middleware suiteAuthor Commented:
-rwxr-xr-x 1 bkp oinstall 74050510 Jul 25 12:30 AvamarClient-linux-rhel4-x86_64-7.1.100-370.rpm
0
 
mac_gAdmin - Oracle Fusion Middleware suiteAuthor Commented:
-rw-r--r--. 1 root root 0 Feb  2  2014 /var/lib/rpm/.rpm.lock
0
 
Sudeep SharmaTechnical DesignerCommented:
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
 
mac_gAdmin - Oracle Fusion Middleware suiteAuthor Commented:
]$ 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
 
Sudeep SharmaTechnical DesignerCommented:
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
 
mac_gAdmin - Oracle Fusion Middleware suiteAuthor Commented:
thanks ..

can u please advice steps how to provide  sudo access to bkp user ?
0
 
Sudeep SharmaTechnical DesignerCommented:
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

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now