Reputation: 692
I am trying to create folders and file in Virtualbox shared folder from Host to guest.
But i get this error mkdir: cannot create directory : Protocol error
.
Below are steps i performed to share folder
1:My host OS is Ubuntu and my guest is Ubuntu.
2:I attached a share folder to virtualBox VM
Folder Path:/DR/vault/config
Folder:config selected automount and make permanent.
3:In Guest OS i installed virtualbox guest additions
4:I am trying to mount folder on /mount/config path
I added entry in guest's /etc/fstab as
/config /mount/config vboxsf rw,uid=1000,gid=1000 0 0
Path gets successfully mounted after Guest reboot also i can see the files created in /DR/vault/config(Guest) to /mount/config(Guest) but i cant create folder or file in /mount/config (Guest)
Please suggest if anything is missing or if there is any other way.
Upvotes: 9
Views: 16182
Reputation: 686
I had a similar issue, turns out that for me it was the number of folders or length of path name involved in mkdir.
typically I had : mkdir -p /projects/bot/node_modules/webpack/node_modules/uglifyjs-webpack-plugin/node_modules/uglify-js/node_modules/yargs/node_modules/cliui/node_modules/center-align/node_modules/align-text/node_modules/kind-of/node_modules/is-buffer Manually I could create up to the last part of the path but not the 'is-buffer' folder
I am working in vagrant and my projects folder is a shared VM folder, maybe/probably windows' max path length is the reason.
Upvotes: 0
Reputation:
In my case, I had the drive full, clearing some space on the drive solved the issue.
Upvotes: 2
Reputation: 1890
I've resolved this problem with the following:
vboxsf
group: sudo adduser username vboxsf
My host OS is Windows, my guest OS Ubuntu.
Upvotes: 1
Reputation: 1
This might be an indication that the folder does not have the correct permissions on the Virtualbox host.
E.g. my headless Virtualbox server is running as "vbox" user, so I had to give that user write permissions on the host folder.
Upvotes: 0
Reputation: 113
I have found this is a problem with filename lengths on DOS hosts. I have been using VirtualBox VMs as a form of containerised environment for deploying to a JBoss server, having experienced far too many problems with Windows environments for said technology. I was using a shared-directory with my host machine as I was trying to keep the virtual machine lightweight (i.e. keeping IDEs in the host machine), then checking code into the shared directory for deployment with Maven. However, maven was giving some odd errors when the directory length grew to over 255 characters. Try looking at your file absolute path (type "pwd") and seeing if it's longer than 255.
Upvotes: 1