You are not logged in.
Hi everyone!
I am a bit lost, I have a fresh install Arch on my laptop. I installed VirtualBox and I set up 1 shared folder. Then I created a guest system, still Arch Linux. It is all good until I try to use Midnight Commander and try to navigate to the shared folder on guest system. From Thunar or console it works. I can navigate inside the shared folder, make files, changes files, delete, create directories everything. But Midnight Commander keeps saying "cannot read directory contents". Then it enters the folder but it thinks it is empty. If I explicitly hit a ctrl+r and then change the folder it works.
I tried to use vboxservice or disable it and manually mount. I played with the switches in VirtualBox shared folder. I even reinstalled the whole guest. I downgraded mc to 4.8.23-1, downgraded virtualbox-guest-utils to 6.0.14-1. But it is the same. I tried chmod -R 777 /media, chown -R myusername:vboxsf /media but for some reason it is the same.
I have already set up shared folders with similar setup in the past many times but not with these versions. The reason I still believe it is still my mistake somehow is the lack of complains about this. I only found a few occurrences on the whole internet mentioning the exact same symptoms, example (please note, 1 is more than a 10 years old report):
https://forums.virtualbox.org/viewtopic.php?f=8&t=18755
https://bugs.archlinux.org/task/60766
Originaly I was on these versions on guest:
linux 5.9.6-1
virtualbox-guest-utils-6.1.16
mc 5.8.25-3
on host:
linux 5.9.3
VirtualBox 6.1.16
Do you have any suggestion what to try?
Offline
It could be the way you are mounting that Shared Folder. On the guest, create a new folder /mnt/[target] (pick any name for [target], but it's easiest to use the same name as the share). Then mount the share to /mnt/[target]. Post the exact commands you used in that sequence (i.e creating the folder and mounting the share).
Also: what filesystems are on the host and the guest?
Offline
Hi, thank you for trying to help. Here are the things I did:
guest logged in user: testuser (not root, added to wheel + vboxsf group)
cd /media
mkdir virtualboxshared
chown -R testuser:vboxsf virtualboxshared
chmod -R 755 virtualboxshared
sudo mount -t vboxsf virtualboxsharedonhost /media/virtualboxshared -o rw,exec,uid=1000,gid=1000 # (1000 is the userid and group id I have for testuser based on "id" command)
cd virtualboxshared
ls -la
touch test
nano test
cat test
rm test
cd ..
cd virtualboxshared
all as expected
And now doing similar things in mc as above, I needed to hit ctrl+r BUT when I hit ctrl+r and I entered a directory and then back 1 level and enter again... it worked for a few seconds sometimes then it showed up the "Cannot read directory contents" again. If I did the same it behaved similarly but the time and the number of times I could navigate back and forth w/o ctrl+r was random, sometimes close to 0 sometimes a few seconds.
filesystems:
host: even /boot is encrypted with LUKS+dmcrypt, no LVM just MBR format and 2 partitions, /boot is ext2 - / is ext4 (of course they are "under" the corresponding /dev/mapper/crypt* "path" when I execute mount command)
guest: 1 partition no encryption ext4
Offline