VirtualBox

Opened 11 years ago

Closed 7 years ago

#11944 closed defect (obsolete)

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

Reported by: Brian B Owned by:
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 (6)

comment:1 by _, 10 years ago

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

comment:2 by Frank Mehnert, 10 years ago

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

comment:3 by groovix, 10 years ago

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 by Frank Mehnert, 10 years ago

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 by groovix, 10 years ago

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 by Frank Mehnert, 7 years ago

Resolution: obsolete
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette