how I am able to write, modify and delete files on mounted file system yet not create links

Discussions related to using VirtualBox on Linux hosts.
Locked
kalyanbl
Posts: 1
Joined: 10. Aug 2018, 12:57
Primary OS: Linux other
VBox Version: OSE Fedora
Guest OSses: Linux
Location: USA
Contact:

how I am able to write, modify and delete files on mounted file system yet not create links

Post by kalyanbl »

Hi folks,

I have a Xubuntu install running in a VM (VirtualBox) on a Windows 10 host. There is a directory on the Windows file system which I have mounted in the guest as a vboxsf. I think it's a linux problem but that's the background in case it's relevant.

I have write access to this directory and all files within it (everything is -rwxrwxrwx). I can create, modify and delete files and directories in it. But trying to create a soft link (ln -s) or chown a file or directory to a different owner produces the following message:

ln: failed to create symbolic link 'myLink': Read-only file system
Have tried everything I can think of including unmounting and re-mounting. I don't understand how I am able to write, modify and delete files, yet a symbolic link produces "read only". Chown completes without an error or warning but still hasn't changed ownership when done.

Thanks
Kalyan bl
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: how I am able to write, modify and delete files on mounted file system yet not create links

Post by socratis »

VirtualBox's Shared Folders present a very simplified file system implementation, just enough to read/write files from/to the guest. Many applications can error when using Shared Folders, because they expect advanced features, for example file locking, access controls, links, etc., which don't exist as a concept for Shared Folders.

As for the symbolic links, read the manual, Ch. 4.3 Shared Folders:
Starting with version 4.0, VirtualBox shared folders also support symbolic links (symlinks), under the following conditions:
  1. The host operating system must support symlinks. For example, a Mac OS X, Linux, or Solaris host is required.
  2. Currently only Linux and Solaris Guest Additions support symlinks.
  3. For security reasons the guest OS is not allowed to create symlinks by default. If you trust the guest OS to not abuse the functionality, you can enable creation of symlinks for a shared folder as follows:
    • VBoxManage setextradata "VM name" VBoxInternal2/SharedFoldersEnableSymlinksCreate/sharename 1
So #2 doesn't cover what you want to do....
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Locked