Sigh. Let's see what goes on.
- Host, Guest: Linux
- Guest Additions installed on Guest, relevant packages on Host too.
- VBox Shared Folders: Create, choose a path, Folder name it "can-i-see-this", Auto mount=yes, Permanent = yes. OK
In terminal:
myuser$ mount | grep vbox
can-i-see-this on /media/sf_can-i-see-this type vboxsf (rw,nodev,relatime)
Found the mount. Can we look inside?
myuser$ ls -l /media/sf_can-i-see-this type
ls: cannot open directory '/media/sf_can-i-see-this': Permission denied
OK weird. We can ls the /media/ folder to see who owns the mounted folder:
$ ls -l /media
total 8
drwxrwx--- 1 root vboxsf 4096 22 jan 2021 sf_can-i-see-this
"root" is the owning user, "vboxsf" is the owning group. Both have full permissions, but --- means anybody else has no rights whatsoever.
Apparently my user doesn't belong to vboxsf group. Can we prove it?
1. If you have command
groups
enter it to show your CURRENT own groups.
2. Otherwise see if "vboxsf" has any users assigned in settings:
myuser$ grep -F "vboxsf" /etc/group
There are no users after the last semicolon.
SOLUTION
Add myself to "vboxsf" group.
myuser$ usermod --help; sudo usermod --append --groups "vboxsf" "$(whoami)"
NOTE: You will show up in (2) group settings, but not in (1) current groups.
YOU MUST LOGOUT AND LOGIN (or reboot VM) TO APPLY NEW GROUP.
AFTER LOGIN
myuser$ groups
... vboxsf ... myuser
myuser$ ls -l /media/
...
myuser$ ls -l /media/sf_can-i-see-this
total 8
-rwxrwx--- 1 root vboxsf 1234 11 sep 2010 custom.cfg
-rwxrwx--- 1 root vboxsf 5678 11 sep 2010 options.cfg
Write a file:
myuser$ echo "Hello from Linux VM" > /media/sf_can-i-see-this/message.txt
Conclusion: User error.
Workaround: Give yourself the supplementary group
vboxsf
Fix: Ask your distro maintainers why they decided to not add your system user to the
vboxsf group so shared folders would work automatically.
Tixati dev: Add a text line that says "No write permission in selected folder" when OK is grayed out.
@Tixati Dev: Can you put the wiki page I will soon finish under "Sections" on the support page?
https://support.tixati.com/virtualbox
Sincerely,
notaLamer