Link to home
Start Free TrialLog in
Avatar of AttilaB
AttilaB

asked on

Oracle VM VirtualBox running on Ubuntu Mate 16.04.1 - Shared Folder Access Issue

I am running Oracle VM VirtualBox 5.1.8 with Ubuntu Mate 16.04.1 as the host system. I am running Ubuntu Mate 15.10 as the guest system. I have the shared folder set up on the host as 'UbuntuSharedFolder' , that comes across the guest side as ''sf_UbuntuSharedFolder'.

See screen shot:

User generated image
It gets automatically mounted every time I start the Guest OS, but it says it doesn't, have the permissions to open it when i try to access from the guest OS. In the host if I try to run this on the host OS:
user@user-A55MLV:~$ sudo usermod -a -G vboxusers $USER
[sudo] password for user: 
user@user-A55MLV:~$ 

Open in new window


It accepts it without errors but it doesn't solve the problem, so it may not run right.

What do I do that the shared folder is accessible from the guest OS?
Avatar of rindi
rindi
Flag of Switzerland image

You need to set up the user/group permissions for that folder on the host so the Users in your VM have the necessary rights. Probably for such a folder you would need 777 rights if you want the users to be able to do everything.
Avatar of AttilaB
AttilaB

ASKER

How do you set up the user/group permissions for that folder on the host?
You use the "chmod" command for that. Below is a link that explains it:

https://en.wikipedia.org/wiki/Chmod
chmod a+rw <path-to-your-shared-folder>

Open in new window

(in the host)
Avatar of AttilaB

ASKER

Ok, I did this on the host OS, since my folder is called 'UbuntuSharedFolder':

user@user-A55MLV:~$ chmod a+rw ~/UbuntuSharedFolder

Open in new window


And it took it without errors.

Still something is wrong here, if you look at the shared folder properties from inside the guest OS:
(Permissions cannot be determined)
User generated image
But, it seems to properly point to the host file system drive, because that's indicated as such:
User generated image
If I look at the folder from the host OS:
(It looks like the permissions are right.)
User generated image
So how come the permissions are right, still it cannot see the files or even permissions for that folder from the Guest OS?
Within VBox itself, where you setup shared folders, also make sure that "Read-Only" is unchecked.
Avatar of AttilaB

ASKER

There is no permissions settings for this folder inside the guest OS: It is owned by 'something' outside the virtual machine, in the host OS.
Also it is set for no access. If you go to properties of the folder this is what you see:
User generated image
And YES, I did set up full access not just read-only in VirtualBox when I created shared folder:
User generated image
So how do you find out who has this permission in the host OS, and how do you change it?
Re-install the VirtualBox extensions within the VM. Make sure it is a current version that corresponds to VirtualBox version you are using.
Avatar of AttilaB

ASKER

That's what I did originally, and I did it again: (both latest versions)
User generated image
Re-install successful:
User generated image
Still, it is not working just the same.
That's just the extension pack. But did you also update the guest additions within the VM itself? The extension pack alone does nothing. It just provides the drivers which then have to be installed within the VM. Ubuntu (I think) comes with VirtualBox guest additions already included in the default kernel modules, but those are usually not for the newest VBox versions.
Avatar of AttilaB

ASKER

That's news to me. Other than 'Insert Guest Additions' from the menu, is there another way of getting to guest additions for a particular OS?

If I look on the download site I don't see any updates for that:
https://www.virtualbox.org/wiki/Downloads

How do you update the Guest Additions for a particular OS?
In the Devices menu, you have the guest adons option. That then enables the iso file for the VM, which you can mount (Ubuntu should mount it automatically), and then show it like a CD Rom. There you then have a script you can run which installs the additions within the VM.

You should also remember to re-run this whenever your Ubuntu updates install new kernel versions.
Avatar of AttilaB

ASKER

Well, that did not work:
(Internal Error in Ubuntu 15.10 guest OS)

This is what it gave me when attempting to unstall:
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.8 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
Press Return to close this window...
^CSignal caught, cleaning up
Press Return to close this window..

Open in new window


I think I will try to set up a new version of the Guest OS that's earlier than this, that used to work.
I will let you know.
Avatar of AttilaB

ASKER

Well, I set up a new OS version 15.04 as the guest, and it doesn't work either:

When trying to install guest additions:

Installing Guest Additions:

Verifying archive integrity... All good.
Uncompressing VirtualBox 5.1.8 Guest Additions for Linux...........
VirtualBox Guest Additions installer
Removing installed version 5.1.8 of VirtualBox Guest Additions...
Copying additional installer modules ...
Installing additional modules ...
vboxadd.sh: Building Guest Additions kernel modules.
Failed to set up service vboxadd, please check the log file
/var/log/VBoxGuestAdditions.log for details.
Press Return to close this window...


Log File:

/opt/VBoxGuestAdditions-5.1.8/src/vboxguest-5.1.8/build_in_tmp: 67: /opt/VBoxGuestAdditions-5.1.8/src/vboxguest-5.1.8/build_in_tmp: make: not found
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

Open in new window


I am pretty much ready to give up on Ubuntu 16.04 as host and re-install 15.04 as the host OS as well and start everything from scratch.
Ubuntu seems to be like Windows: harder to set up each time there is a new release, for the same old thing.
I had trouble with connecting to wi-fi, other error messages off the start regarding the installation of packages so far...
I am working with 16.04 with no problems since months.

Why don't you do exactly what Ubuntu asks you, to look in /var/log/VBoxGuestAdditions.log for error details? Maybe there you can find a solution.
Avatar of AttilaB

ASKER

Ok. I will do that and let you know.
Avatar of AttilaB

ASKER

It is practically working now. I could mount a folder in guest that's linked to a folder on host. In spite of not being able to install guest addition again, fully. I updated everything to the latest version of VirtualBox available:
User generated image
So, it is a different folder I could mount, different then what was created automatically, but works if mounted like this:
sudo mount -o uid=$UID,gid=$(id -g)   -t vboxsf   UbuntuSharedFolder   ~/UbuntuSharedFolder_on_host

Open in new window


I used this shared folder working link what I am sending you right now to copy to the host OS.

Still, the Guest Addition Cannot be updated: (see vboxadd-install.log)
/opt/VBoxGuestAdditions-5.1.10/src/vboxguest-5.1.10/build_in_tmp: 67: /opt/VBoxGuestAdditions-5.1.10/src/vboxguest-5.1.10/build_in_tmp: make: not found
Creating user for the Guest Additions.
Creating udev rule for the Guest Additions kernel module.

Open in new window

In spite of this, all VirtualBox functions appear to be functional, such as shared clipboard.

I don't know what this means.
I think you are missing "make". I'm not sure what package make comes with, but I believe it is in in the kernel headers. or kernel tools.
Avatar of AttilaB

ASKER

Ok. I did an Internet search and it appears that what I need to do to re-install 'make' is the following:
I will try this, when I get home today:
sudo apt-get install --reinstall build-essential

Open in new window

What do you think?
Just try it.
Avatar of AttilaB

ASKER

Well, it was probably not installed, because it cannot be installed:
user@user-A55MLV:~$ sudo apt-get install --reinstall build-essential
[sudo] password for user: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package build-essential is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'build-essential' has no installation candidate
user@user-A55MLV:~$ 
user@user-A55MLV:~$ 
user@user-A55MLV:~$ sudo apt-get install --reinstall make
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of make is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
user@user-A55MLV:

Open in new window

So I am still lost here.
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AttilaB

ASKER

I downgraded to Ubuntu 15.04 and that does not have this or any problem problem if I use the suggested older version 4 VirtualBox with it.

I still very much appreciate your help. Too bad Ubuntu is starting to get to be this mess any more. Years ago all the software I use on Ubuntu just worked at the first try, without messing with it. Now features / installed software that used to work is just flaky, even if you use an LTS release. Hopefully I will be able to get 15.04 fully configured for everything I need.

I don't see any other option. I wonder if RedHat is any practical for a home user.  Really frustrated where Ubuntu is going the last few years....