VirtualBox

Ticket #11944 (closed defect: obsolete)

Opened 5 years ago

Last modified 10 months ago

Virtualbox "Error opening file for reading: Permission denied" when run from command line

Reported by: Brian B Owned by:
Priority: minor Component: other
Version: VirtualBox 4.2.14 Keywords: proc auxv permission EACCES
Cc: Guest type: all
Host type: Linux

Description

When the virtualbox command is run from the command line I get the following error:

Error opening file for reading: Permission denied

Eventually I used strace to track this down:

[pid 16866] open("/proc/self/auxv", O_RDONLY) = -1 EACCES (Permission denied)
Error opening file for reading: Permission denied

Examining it, that file is owned by root but I'm running virtualbox as a non-privileged user. I'm guessing it gets created early and then virtualbox drops privileges before opening the file:

# ls -l /proc/16866/auxv
-r-------- 1 root root 0 Jul  8 16:55 /proc/16866/auxv

Change History

comment:1 Changed 3 years ago by _

This is silly. It complains but does not say what the file is. PLEASE either fix the message or remove it altogether.

comment:2 Changed 3 years ago by frank

To be able to fix this we would require instructions how to reproduce.

comment:3 Changed 3 years ago by groovix

I am seeing the same message: just run virtualbox as a normal user from the command line and you'll see the message:

Error opening file for reading: Permission denied

This is on Ubuntu 12.04. I haven't tried any other oses.

ls -l /proc/self/auxv shows:

-r-------- 1 myusername myusername 0 Mar 12 12:45 /proc/self/auxv

and I cannot chmod that file as myusername or root (although the permissions indicate that I should be able to read it as is)

comment:4 Changed 3 years ago by frank

Sorry, I don't see the message. The /proc/self/auxv file is present here as well with the same permissions. There is no code in VirtualBox on Linux hosts which tries to access this file, check the source code yourself. And doing strace here I don't see any attempt to access this file either.

So I guess that it's some library used by VirtualBox which does this access.

comment:5 Changed 3 years ago by groovix

When I made my comment I didn't realize /proc/self is a link specific to each process, so after finding the virtualbox pid I see: ls -l /proc/11224/auxv -r-------- 1 root root 0 Mar 16 07:36 /proc/11224/auxv

So the problem seems to be that auxv ends up with root-only permissions (even though the virtualbox process is owned by a normal user ) and something is trying to read it. As frank said, virtualbox is not accessing /proc/self/auxv directly.

I'm guessing it has to do with seteuid, won't be fixed in Ubuntu 12.04, and may already be fixed in 14.04:  https://bugs.launchpad.net/ubuntu/+source/libjpeg-turbo/+bug/1031718

comment:6 Changed 10 months ago by frank

  • Status changed from new to closed
  • Resolution set to obsolete
Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use