VirtualBox

Opened 14 years ago

Closed 14 years ago

#6696 closed defect (worksforme)

Shared folder mount fails during boot of Linux guest (using /etc/fstab) - Ubuntu 10.04LTS

Reported by: Jim Avera Owned by:
Component: shared folders Version: VirtualBox 3.1.8
Keywords: Cc:
Guest type: Linux Host type: Linux

Description (last modified by Frank Mehnert)

Errors occur when booting a linux guest if /etc/fstab tries to mount a shared folder. After boot-up the share is mounted in spite of the error, but only root can write files in it.

When the error is reported during booting, Ubuntu asks whether to 'Skip' the mount or 'Manually recover' via a root prompt. If Manual recovery is selected, then 'mount' does not show the share as being mounted, and "mount -t vboxsf sharename /mountpt" fails with "/sbin/mount.vboxsf: mounting failed with the error: No such device".

After boot completes (or after reboot and selecting 'Skip' when the error is reported), then the share IS mounted. I'm guessing that 'mountall' is run multiple times during the boot sequence, and it succeeds later on in the boot.

However, non-root users get 'Permission denied' when trying to create files in the shared folder. Reading works. The permission problem is not fixed by umount + new mount, and making the UID & GID in guest the same as the owner of the mounted directory in the host does not help.

Share definition: Name=hosttmp Path=/tmp Access=Full

Guest's /etc/fstab entry:

hosttmp /hosttmp  vboxsf   nodev,noexec,nosuid 0 0

NOTE: The 3.1.8 Changelog reports that a bug preventing mounting shares via /etc/fstab was fixed. So this may be a different problem.

Both host and guest are running Ubuntu 10.04LTS on amd64, but the VM was created earlier while the host was running an older ubuntu release (9.10).

Attachments (2)

VBox.log (66.4 KB ) - added by Jim Avera 14 years ago.
dmesg.out (25.7 KB ) - added by Jim Avera 14 years ago.
Output from 'dmesg' on guest after bootup

Download all attachments as: .zip

Change History (8)

by Jim Avera, 14 years ago

Attachment: VBox.log added

comment:1 by Jim Avera, 14 years ago

Hmm, I can't seem to attach VBox.log (or anything else). When I click 'Attach File' and enter the file path and click 'Add Attachment', the contents of the file are displayed as though I had DOWNloaded an already-created attachment; indeed, a message "... attached 0 seconds ago" appears with the file display. But the attachment is not really there...

by Jim Avera, 14 years ago

Attachment: dmesg.out added

Output from 'dmesg' on guest after bootup

comment:2 by Frank Mehnert, 14 years ago

Description: modified (diff)

comment:3 by Frank Mehnert, 14 years ago

According to the dmesg.out you still have the 3.1.6 additions installed. Please update the additions to 3.1.8.

The permission problem has probably a different cause. Note that the permissions of the host file are mapped to the guest but user/group of the guest files are set to root/root. To change this use uid=aaa,gid=bbb where aaa is the desired user ID and bbb is the desired group ID.

comment:4 by Jim Avera, 14 years ago

Oops! Updating to Guest Additions 3.1.8 fixed the mount error. Thanks for spotting that.

Question: Is there a way to tell vbox to not remap UID/GID when accessing a shared folder? What I'm trying to do is mount the host's /tmp in the guest in such a way that multiple users in the guest can read and write into it, just as if it was a regular mounted file system.

Thanks for your help.

comment:5 by Frank Mehnert, 14 years ago

No, that's not possible. From the guests point of view there is only one UID/GID of all files in a shared folder.

comment:6 by Frank Mehnert, 14 years ago

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

© 2023 Oracle
ContactPrivacy policyTerms of Use