Page 1 of 1

can't write to files in Shared Folders

Posted: 17. Feb 2014, 21:57
by Mr.Gosh
On my Linux Host (ubuntu 12.04.4 64bit) is a directory shared to several linux guests (ubu tu 12.04 32bit).
The newest GuestAdditions are installed, Kernel Headers too.
The users on the Guest machine are in the vboxsf group.


if I mount it automatically or by hand I can use it and create folders and files...
but I cant write to files....

Code: Select all

$mount
archive on /media/sf_archive type vboxsf (gid=104,rw)
so it is mounted

Code: Select all

$ll /media/sf_archive/
total 1028
drwxrwx--- 1 root vboxsf    0 Feb 17 20:28 ./
drwxr-xr-x 6 root root   4096 Feb 17 20:38 ../
-rwxrwx--- 1 root vboxsf    0 Feb 17 19:59 dsfdfsdf*
drwxrwx--- 1 root vboxsf    0 Feb 17 19:19 test/
drwxrwx--- 1 root vboxsf    0 Feb 17 19:26 test2/
drwxrwx--- 1 root vboxsf    0 Feb 17 19:37 test3/
drwxrwx--- 1 root vboxsf    0 Feb 17 19:59 testdfdfdf/
so I can create folders and files but if I try to write something into a file:

Code: Select all

$ echo test >> dsfdfsdf 
-bash: dsfdfsdf: Operation not permitted

$ sudo echo test >> dsfdfsdf 
-bash: dsfdfsdf: Operation not permitted
I even can't create folders in subdirectories:

Code: Select all

/media/sf_archive/test3$ mkdir test6
mkdir: cannot create directory `test6': Protocol error
The same error occours when I mount it by hand (what I donÄT want cause I have to touch every vm by hand if i do so...)

Re: can't write to files in Shared Folders

Posted: 17. Feb 2014, 22:39
by Perryg
Auto-mount will require you to be in the vboxsf group on each guest as well as having the guests additions installed.

You may still have permission issues though and I find manually mounting them to be the most reliable. You can then add the mount instruction to /etc/rc.local and it will mount them on reboot.

You need to make sure that you mount and set options for rw as well as uid & gid. Type id in the guest terminal to see what your uid & gid are and replace the 1000 below with yours.

Example:
sudo mount -t vboxsf -o rw,uid=1000,gid=1000 <share name> <mount point>

-o = oh not zero

Re: can't write to files in Shared Folders

Posted: 18. Feb 2014, 02:12
by Mr.Gosh
Hi,

Thanks for the post - but I covered that allready - groups are fine and manual mounting doesn't solve the problem, I still get an:

Code: Select all

$ touch /media/shared/archive/test_1
touch: cannot touch `/media/shared/archive/test_1': Protocol error
also sudo doesn't help:

Code: Select all

$ sudo touch /media/shared/archive/test_1
touch: cannot touch `/media/shared/archive/test_1': Protocol error

Re: can't write to files in Shared Folders

Posted: 18. Feb 2014, 02:22
by Perryg
Do you have the guest additions installed ( in the guest )?
Other than that the only other protocol errors I have seen are typos.

Re: can't write to files in Shared Folders

Posted: 20. Feb 2014, 15:46
by Mr.Gosh
Yes of course - and these are the newest...

Re: can't write to files in Shared Folders

Posted: 10. Feb 2017, 15:24
by davepl
I also can't write to shared folders have exactly the same symptoms. This is openSUSE:Leap:42.2 with VirtualBox-5.1-5.1.14_112924_openSUSE132-1.x86_64.rpm and a Leap:42.1 guest. I've given up trying to create a linked repository and have used a usb external hard drive.