Cannot create soft link in CentOS running in VBox 4.3.12
Posted: 16. Jun 2014, 05:52
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
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.
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
ssh saqib@127.0.0.1 -p 3005I 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 systemAs 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