VirtualBox

Ticket #9066 (new defect)

Opened 3 years ago

Last modified 6 months ago

Shared folders lose guest access to folder contents when folders renamed

Reported by: monsieurrigsby Owned by:
Priority: major Component: shared folders
Version: VirtualBox 4.0.8 Keywords: vboxsf
Cc: Guest type: other
Host type: other

Description

On a Win7 x64 host and Ubuntu 11.04 x64 guest, whenever I rename a shared folder directory, the guest OS loses references to the files therein. The files are still there (and correct on the host OS) but somehow inaccessible on the guest: ls shows the filename, but gives "no such file or directory" errors for each file therein (so it would appear that it's there in the filesystem tables, but the pointer to the actual location has got broken somehow). This therefore definitely appears to be a vboxsf error.

The file access can be "restored" by remounting the folder, or by renaming the folder back to its original name. The error always occurs, however the renaming is done (console or file manager). It also occurs if the folder is renamed on the host.

This is a pretty serious error, especially because many apps put things in hidden folders and then rename these (e.g. backup utilities such as Unison).

Change History

comment:1 Changed 3 years ago by monsieurrigsby

To clarify, below is sample reproduction on console (the "ls shows the filename" in the original text is talking about the Linux command ls (el-es), though it's formatted like the word "Is" (capitalised is)!

rigsby@Shelob:/media/sf_ShareTest$ mkdir x
rigsby@Shelob:/media/sf_ShareTest$ cd x
rigsby@Shelob:/media/sf_ShareTest$ touch a b c
rigsby@Shelob:/media/sf_ShareTest$ cd ..
rigsby@Shelob:/media/sf_ShareTest$ ls x
a  b  c
rigsby@Shelob:/media/sf_ShareTest$ mv x x2
rigsby@Shelob:/media/sf_ShareTest$ ls x2
ls: cannot access x2/a: No such file or directory
ls: cannot access x2/b: No such file or directory
ls: cannot access x2/c: No such file or directory
a  b  c
rigsby@Shelob:/media/sf_ShareTest$ mv x2 x
rigsby@Shelob:/media/sf_ShareTest$ ls x
a  b  c

comment:2 follow-up: ↓ 3 Changed 3 years ago by chungs

I have the same problem with 4.0.8 as well as 4.0.4 (but the last one with 4.0.8 additions on the guest, so maybe the problem is in the additions). I experienced the bug running linux 64 bits as both host and guest. After renaming a directory, if I do ls of the contents of the directory I can see the file names but the dates and attributes are all ????, so I guess stat() fails.

comment:3 in reply to: ↑ 2 Changed 3 years ago by chungs

Some additional info: this didnt happen with older additions, started happenning in 4.0.4 or 4.0.8 (I'm not sure which). Here's again another example run in a linux 2.6.39 64bits guest with additions 4.0.8:

[guest@localhost share]$ mkdir x
[guest@localhost share]$ touch x/{a,b,c}
[guest@localhost share]$ ls -la x
total 8
drwxr-xr-x 1 guest users 4096 Jul  4 10:05 .
drwxr-xr-x 1 guest users 4096 Jul  4 10:04 ..
-rw-r--r-- 1 guest users    0 Jul  4 10:05 a
-rw-r--r-- 1 guest users    0 Jul  4 10:05 b
-rw-r--r-- 1 guest users    0 Jul  4 10:05 c
[guest@localhost share]$ mv x x2
[guest@localhost share]$ ls -la x2
ls: cannot access x2/a: No such file or directory
ls: cannot access x2/b: No such file or directory
ls: cannot access x2/c: No such file or directory
total 8
drwxr-xr-x 1 guest users 4096 Jul  4 10:05 .
drwxr-xr-x 1 guest users 4096 Jul  4 10:05 ..
?????????? ? ?     ?        ?            ? a
?????????? ? ?     ?        ?            ? b
?????????? ? ?     ?        ?            ? c

comment:4 Changed 3 years ago by chungs

BTW, the ticket title should be changed, since this is not restricted to Ubuntu 11.04 on Win 7

comment:5 Changed 3 years ago by aaronharwood

I can verify this problem on the Mac OSX as host, with Ubuntu 11.04 as guest. Exactly the same procedure above produces the problem, as does any other program which does likewise.

Since all of my data is on the host file system with shared access for the guest OS, this is a serious problem for me.

comment:6 Changed 3 years ago by monsieurrigsby

@chungs

Agree the title needs changing (esp. so that the developers realise this is a much more prevalent problem than it might suggest).

However, unless I'm being dumb, I can't change the title, even as the ticket creator :-( Can an admin please change this?? I guess the bracketed bit should change to (Linux guest on any host).

comment:7 Changed 3 years ago by monsieurrigsby

Can anyone confirm this still occurs on 4.0.10 (imagine it definitely does given the change list)? I'm not likely to be upgrading any time soon...

comment:8 Changed 3 years ago by michael

  • Host type changed from Windows to other
  • Guest type changed from Linux to other
  • Summary changed from Shared folders lose guest access to folder contents when folders renamed (Ubuntu 11.04 on Win 7) to Shared folders lose guest access to folder contents when folders renamed

comment:9 Changed 3 years ago by monsieurrigsby

I can confirm this persists on v4.1.0 (so an admin can feel free to change the Version tag).

comment:10 Changed 3 years ago by bhuffman

I think this is Ubuntu 11.04 guest only though, so guest should still say "Linux." I have a Centos 5.6 host with multiple guest OS' accessing the same shared folder. I've got Ubuntu 10.04, 10.10 and 11.04 and only the 11.04 exhibits this problem.

comment:11 Changed 3 years ago by monsieurrigsby

Following on from bhuffman's comments, can confirm that seems restricted to Ubuntu Natty (11.04) only in that this bug is not present with Ubuntu 10.04 and OpenSUSE 11.3.

comment:12 Changed 3 years ago by Urhixidur

I can confirm this happens with a 32-bit Ubuntu 11.04 guest on a Windows XP host.

The behaviour that led me here is as follows: the guest has access to the shared folder's subdirectories and contents. The host has also published the shared folder over the local network. I then add directories to the shared folder from a remote machine. Result: the guest's Nautilus does not see the new directories. However ls does show the new directories in red along with an error "ls: cannot access x: No such file or directory". A reboot of the guest is required to fix this.

Note that if the host directly creates a folder in the shared folder, the guest updates correctly. If the host renames the red folder, the guest sees it upon refresh. If the host then renames the folder back to its original "red" name, it becomes inaccessible again. But if the *guest* does the renaming, the problem is resolved...for that folder only: any subfolders remain red. The same applies to files (they must be renamed by the host then the guest to fix the problem).

Even stranger, the problem does not arise every time: after rebooting the guest, I tried remotely creating a folder again...and it refreshed just fine.

comment:13 Changed 3 years ago by Urhixidur

Update: A rename by a remote machine works just like a rename by the host.

comment:14 Changed 2 years ago by stagas

The bug still exists in v4.1.4 tested with 64bit Windows 7 host and 64bit Ubuntu 11.10 guest.

comment:15 Changed 2 years ago by benissimo

I see the same bug using v4.1.6 with OS X host (10.6.8) and 64 bit Ubuntu guest (10.0.4).

comment:16 Changed 2 years ago by mrsombre

Confirmed for fedora16 guest and win7x64 https://www.virtualbox.org/ticket/9935

comment:17 Changed 2 years ago by rizidoro

Host: OSX Lion Guest: Ubuntu 11.10 Server

VBox 4.1.6

comment:19 Changed 15 months ago by brendaStar

Issue is observed here as well.

Host: Ubuntu 11.10 Server 64Bit Guest: Ubuntu 11.10 Server 64Bit, Windows XP 32/64, Windows 7 32/64

VBox 4.1.16

comment:20 Changed 8 months ago by Martin Geisler

Confirmed for Virtualbox 4.2.16 as well with Debian as host and Ubuntu as guest. I haven't renamed my folder, just deleted it and recreated it.

This is a Python application and a file called "tasks/init.py" file cannot be read in the guest OS. I can create other files in the folder on the host OS and they are correctly read in the guest OS.

comment:21 Changed 6 months ago by ajw0100

Same issue.

Host: OS X 10.8.5 Guest: Ubuntu Server 12.0.4.3 Vbox: 4.2.18

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use