Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I try to install some .rpm I've downloaded, I'm getting:

> sudo rpm -i something.rpm
error: open of something.rpm failed: Permission denied

It seems that the choice of rpm doesn't matter. I've chmodded the the .rpm first (777) but it doesn't make a difference. What am I missing? Using rpm -i -v doesn't reveal any additional information.

System is RHEL6 64-bit.

share|improve this question
Can you show the output of sudo -l – Not Now Aug 21 '12 at 15:20
SELinux, maybe? – derobert Aug 21 '12 at 16:00
up vote 7 down vote accepted

If your the rpm file is in your home directory and your home directory is on NFS, root may not have access to it. This is somehow unusual: normally, root can access every file. But in common setup, when root access a directory that is mounted over NFS, the rights of the user nobody are used instead of the root user. The main purpose is to ensure that root on the client cannot manipulate files as root on the server. This is implemented as “root has the permissions of nobody” rather than “root can have anybody's permissions execpt root's” primarily because this is easier (though there can be other reasons: some NFS server apply this to users other than root, so as to protect all system users on the server).

If this is the issue, you need to make both the rpm file and the directory containing the file accessible to root. That means making them accessible to the user nobody, and usually the only way to do that is to make the file and the directory world-readable. More precisely, the minimal permissions are

chmod a+x .
chmod a+r something.rpm

Alternatively, move the rpm file to a local directory.

mv something.rpm /tmp
sudo rpm -i /tmp/something.rpm
share|improve this answer
Absolutely spot-on, thank you for the quick answer. – Oak Aug 22 '12 at 7:16

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.