Can't create symlink on shared folder

2

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.

Hammadian

Posted 2017-07-20T20:10:55.380

Reputation: 21

1

check this: https://superuser.com/questions/446362/why-cant-i-create-soft-link-on-vboxsf-file-system hope helps

– Genaro Morales – 2017-07-20T20:35:47.233

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 – 2017-07-25T15:05:25.960

Answers

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!

Tim

Posted 2017-07-20T20:10:55.380

Reputation: 101