Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

ln -s keeps saying me that file system is read-only, however it is not.

ice@distantstar:~/virt 
➜ touch file
ice@distantstar:~/virt 
➜ rm file
ice@distantstar:~/virt 
➜ ln -s ~/.bashrc ~/virt/.bashrc
ln: failed to create symbolic link `/home/ice/virt/.bashrc': Read-only file system
ice@distantstar:~/virt 
➜ mount | grep virt
none on /home/ice/virt type vboxsf (rw,nodev,relatime)
ice@distantstar:~/virt 
➜ cat /etc/fstab | grep virt
VIRT    /home/ice/virt  vboxsf rw   0   0
share|improve this question

1 Answer 1

up vote 13 down vote accepted

In Virtual Box 4.1.8, creating symlinks using a guest-OS in a shared folder has been disabled for security reasons.

For more information, check out this ticket: VirtualBox Ticket 10085 Disabled Symlinks To re enable, you can try running this command:

VBoxManage setextradata VM_NAME VBoxInternal2/SharedFoldersEnableSymlinksCreate/SHARE_NAME 1

where SHARE_NAME is the name of your Shared Folder.

Alternatively you can downgrade to 4.1.6 and that should fix the issue.

share|improve this answer
    
Ok. Thank you. Now I have ln: failed to create symbolic link `/home/ice/virt/.bashrc': Protocol error –  mlatu Jul 10 '12 at 10:59
    
Well, my bad. I was trying to create link to file in the guest OS's filesystem. which makes no sense, obviously. Vice versa it works: ln -s ~/virt/file ~ –  mlatu Jul 10 '12 at 11:10
    
Very good solution, but this is reported to not to work anymore in recent 4.2 releases. Whenever I'm creating a symbolic link on a shared folder (independent of the destitnation) I get ln: failed to create symbolic link 'linkname': Protocol error It's just sad this hasn't been addressed properly. Any new work around verified to work in 4.2.6+? –  gertvdijk Feb 12 '13 at 14:46
1  
@gertvdijk if you're running a Windows host, you may want to run VirtualBox as administrator, it needs special privileges to be able to create Windows-style symlinks. –  Ezequiel Muns Feb 28 '13 at 13:28
    
Don't forget once you have run this command to restart your virtual box machine –  Jason Apr 27 at 0:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.