2

I have a Lubuntu 15.10 VM installed in a Windows 7 host and running with Virtualbox Version 5.0.14 .

I've created a permanent shared folder in Virtualbox's machine configuration and set it to be automatically mounted and unchecked the read only option

When I try to copy a directory to this mounted folder I get this error message for every file in the source directory

root@foo /v/w/h/# sudo cp -r . /media/sf_C_DRIVE
cp: impossible de créer le fichier standard «/media/sf_C_DRIVE/./.gitignore»: Erreur de protocole
cp: impossible de créer le fichier standard «/media/sf_C_DRIVE/./composer.json»: Erreur de protocole
cp: impossible de créer le fichier standard «/media/sf_C_DRIVE/./composer.lock»: Erreur de protocole
cp: impossible de créer le fichier standard «/media/sf_C_DRIVE/./composer.phar»: Erreur de protocol

Which is literary translated to impossible to create the standard file /media/sf_C_DRIVE/./.gitignore : protocole error

Any Idea about how can I fix this ?

Edit 1

My user is already in the vboxsf group

root@jerbi /m/sf_C_DRIVE# groups jerbi
jerbi : jerbi adm cdrom sudo dip plugdev lpadmin sambashare vboxsf

So it seems to be a mount error as I can't remount the folder getting this error

/sbin/mounpt.vboxsf: mounting failed with the error: Protocol error
4

Fixed this by creating a new mount point in /home/username/share

# ln -s /media/sf_C_DRIVE /home/username/share
# chown username:username /home/username/share
# exit

Then I restarted the system and run chmod to the new directory in the startup

$ chmod 777 ~/share
3

The usual problem is that you must add yourself into the vboxsf group in /etc/group on the guest machine. Try the following command:

sudo usermod -a -G vboxsf $USER

Followed by logging out and then re-login.

2
  • Tried this .. same output – storm Mar 11 '16 at 9:17
  • So the problem can be on the Windows side: what is the name of the shared folder? The name can be an issue sometimes and on your Windows Host should preferably be a sub-folder... – andrew.46 Mar 11 '16 at 23:15
1

The host os and host device formatting can cause this issue. My host os is Mac OS, I have mounted shared folders which are APFS and exFat.

sudo mount -o defaults,uid=1000,gid=$(getent group docker | cut -d: -f3) -t vboxsf mcs /media/sf_mcs
sudo mount -o defaults,uid=1000,gid=$(getent group docker | cut -d: -f3) -t vboxsf active /media/sf_active

tar cvf /media/sf_mcs/backup.tar . fails - Protocol error, host device is exFat
tar cvf /media/sf_active/backup.tar . works, host device is APFS

0

Try the solution by andrew.46 that suggests adding your user to the user-group of vboxsf.

  • If you are still facing the problem that the folder is locked and you can't cd without being the root or similar then:

  • On your Windows installation, go to the shared folder and check if "read only" is not tick marked in folder properties.

I had this issue which made me scratch my head for so long. Hope it helps someone.

1
  • @Nmath Thankyou :) – 1UC1F3R616 Sep 17 '20 at 17:48
0

you can also umount your shared file and remount it again by:

sudo umount /media/sf_YOUR_SHARED_FOLDER

Then re-mount it, again;

sudo mount -t vboxsf -o gid=<usernameID>,uid=<groupID>,rw
<Shared_File_name> /media/<Shared_File_name> # mount vbox file

The idea from this, is to transfer the permission from your root to your Linux user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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