5

I am trying to create a symlink on shared folder and it is failing.

  1. Host: Windows 7
  2. Guest: Debian Jessie
  3. Shared folder created using VirtualBox dialog, automount disabled
  4. Mounting command:

    sudo mount -t vboxsf -o uid=1000,gid=1000 vm_shared /home/userName/vm_shared

Now, I cd to ~/vm_shared and ls and mkdir no problem, they show on host windows machine and guest Linux machine.

When I try to create a symlink in the shared folder to be able to browse another Linux folder from Windows machine using:

sudo ln -s ~/toBeBrowsed  ~/vm_shared/targetFolder

I get the following:

ln: failed to create symbolic link ‘~/vm_shared/targetFolder/toBeBrowsed’: Read-only file system

What am I missing?

Update: You can't create a symlink to shared folder that resides on a file system that does not support symlinks.

2
  • 2
    check this: superuser.com/questions/446362/… hope helps Commented Jul 20, 2017 at 20:35
  • Thank you for your answer, I read the answer you provided but it just shows the new symlink in the host Windows as a file with extention ".symlink"
    – Hammadian
    Commented Jul 25, 2017 at 15:05

2 Answers 2

2

Yes you are correct, apparently you can't create symbolic links on the host as this has been disabled in VirtualBox for security reasons.

1
  • You're bringing this in a deceptive way. It's disabled by default and can be enabled. Commented May 4, 2022 at 14:03
0

Update: You can't create a symlink to shared folder that resides on a file system that does not support symlinks.

This ain't entirely true, you may create a symbolic link with a relative path on the host system (tried this with macOS, don't know about Windows).

One small problem still exists then, the file system sees a symbolic link 'folder' as a file and doesn't get execution rights by default, causing it you may not browse up the folder tree.

You can fix this by forcing the permissions on the mounted folder, with the fmode and dmode options:

mount vboxsf -o auto,rw,fmode=0774,dmode=0774 volume1 /mnt/volume1

Don't do this on a production server, since all files will be executable!

1
  • The below is working in ubuntu 22.04 sudo mount -t vboxsf -o auto,rw,fmode=0774,dmode=0774,gid=1000,uid=1000 volume1 /mnt/volume1
    – Arul
    Commented Jan 25, 2023 at 5:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .