Enable to write in Virtualbox's shared folder

10,106

Solution 1

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

Solution 2

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.

Solution 3

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

Share:
10,106

Related videos on Youtube

storm
Author by

storm

Updated on September 18, 2022

Comments

  • storm
    storm over 1 year

    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
    
  • andrew.46
    andrew.46 about 8 years
    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...
  • 1UC1F3R616
    1UC1F3R616 over 3 years
    @Nmath Thankyou :)