Cannot create soft link in CentOS running in VBox 4.3.12

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
Saqib Ali
Posts: 1
Joined: 16. Jun 2014, 05:46

Cannot create soft link in CentOS running in VBox 4.3.12

Post by Saqib Ali »

I have setup a VirtualBox (version 4.3.12) running on my MacBook Pro (OS X 10.9). This VirtualBox is running CentOS 6.5. I can successfully SSH from the Macbook to the CentOS VM by doing

Code: Select all

ssh saqib@127.0.0.1 -p 3005
Now I want to be able to access and edit the files on the (Guest) CentOS VM (under the /var/www directory) using the nice editors and tools I have installed natively on my (Host) MacBook. But I'm having trouble doing so.

I successfully followed the instructions here. Now I have a directory on the Guest OS called /mnt/my_share_name from which I can access files on the Host OS's file system. Great! But what I really need is the opposite. I want to be able to access files in the Guest OS's /var/www directory from the Host OS. How Can I do that?? I tried inserting a link in /mnt/my_share_name as shown below. But it didn't work.

Code: Select all

# From the CentOS VirtualBox
% cd /mnt/my_share_name
% sudo touch me
% ls
me
% sudo ln -s /var/www www
ln: creating symbolic link `www': Read-only file system
It seems I'm not the only person that has had this problem. People have talked about it int he VirtualBox forums. What is the solution here? How to use native GUI tools on my Host OS to manipulate files on the Guest OS?

As a hack, I even tried copying the whole Guest OS's /var/www directory into the share but even that failed because the source directory contains soft links within it

Code: Select all

% pwd
% /mnt/my_share_name
% sudo cp -r /var/www .
cp: cannot create symbolic link `./subdir1/subdir2/subdir3/linkdir
noteirak
Site Moderator
Posts: 5231
Joined: 13. Jan 2012, 11:14
Primary OS: Debian other
VBox Version: OSE Debian
Guest OSses: Debian, Win 2k8, Win 7
Contact:

Re: Cannot create soft link in CentOS running in VBox 4.3.12

Post by noteirak »

There is only one solution : create a proper network share. Doing so has nothing to do with Virtualbox tho.
From guest to host, Virtualbox cannot help you directly.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Post Reply