[Solved] can't access directory of shared folder in virtual

Archived topics about LMDE 1 and LMDE 2
Locked
bluesilisk

[Solved] can't access directory of shared folder in virtual

Post by bluesilisk »

I have a Win7 host running VirtualBox 4.2.4 (cannot upgrade due to group policies). The guest is "LMDE Cinnamon Edition" with update pack 8, all updates installed.

In the machine settings I added a shared folder which I see inside the LMDE machine:

Code: Select all

vm-lmde ~ # mount
...
none on /media/sf_lmdeshare type vboxsf (rw,nodev,relatime)
...
I can also chdir to this directory, both as root and as "normal" user (which is already in group vboxsf) and create or read files:

Code: Select all

user@vm-lmde:/media/sf_lmdeshare$ date > datum.txt
user@vm-lmde:/media/sf_lmdeshare$ cat datum.txt
Mon Apr 28 14:46:15 CEST 2014
It is also possible to see or change the files in the Win7 host.

However, every action that tries to read the directory structure fails, e. g. ls or file name expansion using tab key.

There is a different VM on this host running Ubuntu 12.04 LTS. On this machine everything works fine (with a different directory). There is one difference in the mount flags:

Code: Select all

user@Ubuntu12:~$ sudo mount
...
ubuntushare on /media/sf_ubuntushare type vboxsf (gid=125,rw)
...
Any ideas?

BR, Udo

PS: Maybe this output might help:

Code: Select all

user@vm-lmde:/media/sf_lmdeshare$ strace ls 2>&1 | head -100
execve("/bin/ls", ["ls"], [/* 64 vars */]) = 0
brk(0)                                  = 0x8272000
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7705000
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=89839, ...}) = 0
mmap2(NULL, 89839, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb76ef000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260J\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=133148, ...}) = 0
mmap2(NULL, 142540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76cc000
mmap2(0xb76ec000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1f) = 0xb76ec000
mmap2(0xb76ee000, 3276, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76ee000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libacl.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\26\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=30300, ...}) = 0
mmap2(NULL, 33148, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76c3000
mmap2(0xb76ca000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x6) = 0xb76ca000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340\226\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1521132, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76c2000
mmap2(NULL, 1526460, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb754d000
mmap2(0xb76bc000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x16f) = 0xb76bc000
mmap2(0xb76bf000, 10940, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76bf000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libpcre.so.3", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\22\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=255908, ...}) = 0
mmap2(NULL, 254540, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb750e000
mmap2(0xb754c000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3e) = 0xb754c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320\n\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=13856, ...}) = 0
mmap2(NULL, 16512, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7509000
mmap2(0xb750c000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x2) = 0xb750c000
close(3)                                = 0
access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or directory)
open("/lib/i386-linux-gnu/libattr.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\16\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=17824, ...}) = 0
mmap2(NULL, 20656, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7503000
mmap2(0xb7507000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb7507000
close(3)                                = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7502000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7501000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7501740, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76bc000, 8192, PROT_READ)   = 0
mprotect(0xb7507000, 4096, PROT_READ)   = 0
mprotect(0xb750c000, 4096, PROT_READ)   = 0
mprotect(0xb76ca000, 4096, PROT_READ)   = 0
mprotect(0xb76ec000, 4096, PROT_READ)   = 0
mprotect(0x8062000, 4096, PROT_READ)    = 0
mprotect(0xb7727000, 4096, PROT_READ)   = 0
munmap(0xb76ef000, 89839)               = 0
statfs64("/sys/fs/selinux", 84, 0xbf9bef2c) = -1 ENOENT (No such file or directory)
statfs64("/selinux", 84, 0xbf9bef2c)    = -1 ENOENT (No such file or directory)
brk(0)                                  = 0x8272000
brk(0x8293000)                          = 0x8293000
open("/proc/filesystems", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7704000
read(3, "nodev\tsysfs\nnodev\trootfs\nnodev\tb"..., 1024) = 350
read(3, "", 1024)                       = 0
close(3)                                = 0
munmap(0xb7704000, 4096)                = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbf9bec18) = -1 ENOTTY (Inappropriate ioctl for device)
ioctl(1, TIOCGWINSZ, 0xbf9bed14)        = -1 ENOTTY (Inappropriate ioctl for device)
openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY|O_CLOEXEC) = 3
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
getdents64(3, /* 1 entries */, 32768)   = 24
...
The line "getdents64(3, /* 1 entries */, 32768) = 24" occurs "for ever".
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Monsta
Level 10
Level 10
Posts: 3071
Joined: Fri Aug 19, 2011 3:46 am

Re: can't access directory of shared folder in virtualbox

Post by Monsta »

A combination of Guest Additions < 4.2.18 and kernel 3.11 prevents the shared folders from working (see this bug).
You need to either use an earlier kernel or get the updated Guest Additions packages (virtualbox-guest-dkms, virtualbox-guest-utils, virtualbox-guest-x11) from Debian Testing repos.
bluesilisk

Re: can't access directory of shared folder in virtualbox

Post by bluesilisk »

This was the solution, thank you!

I downloaded virtualbox-guest-additions-iso_4.3.10-1_all.deb from https://packages.debian.org/jessie/all/ ... o/download, installed this package, mounted /usr/share/virtualbox/VBoxGuestAdditions.iso and installed this content. Now ls works and I see the directory structure.
Locked

Return to “LMDE Archive”