VirtualBox

Opened 13 years ago

Last modified 8 years ago

#9066 new defect

Shared folders lose guest access to folder contents when folders renamed

Reported by: Stuart Rossiter Owned by:
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 (23)

comment:1 by Stuart Rossiter, 13 years ago

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 by chungs, 13 years ago

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.

in reply to:  2 comment:3 by chungs, 13 years ago

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 by chungs, 13 years ago

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

comment:5 by Aaron, 13 years ago

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 by Stuart Rossiter, 13 years ago

@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 by Stuart Rossiter, 13 years ago

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 by Michael Thayer, 13 years ago

Guest type: Linuxother
Host type: Windowsother
Summary: Shared folders lose guest access to folder contents when folders renamed (Ubuntu 11.04 on Win 7)Shared folders lose guest access to folder contents when folders renamed

comment:9 by Stuart Rossiter, 13 years ago

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

comment:10 by bhuffman, 13 years ago

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 by Stuart Rossiter, 13 years ago

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 by Daniel U. Thibault, 13 years ago

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 by Daniel U. Thibault, 13 years ago

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

comment:14 by George Stagas, 13 years ago

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

comment:15 by Ben Ellis, 13 years ago

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 by Dmitry, 13 years ago

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

comment:17 by Rafael Izidoro, 13 years ago

Host: OSX Lion Guest: Ubuntu 11.10 Server

VBox 4.1.6

comment:19 by R.Volkmer, 11 years ago

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 by Martin Geisler, 11 years ago

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 by ajw0100, 11 years ago

Same issue.

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

comment:22 by harendra, 8 years ago

I am seeing the same problem with OS X 10.11.3 (El Capitan) Host and VirtualBox 5.0.2 r102096. The guest OS is debian jessie.

The problem manifests in multiple ways but always seems to be associated with directory renaming. Sometimes I see a directory showing the contents of a directory under the old directory tree which was renamed. Sometimes I see inaccessible directories. For example I renamed the parent of the src directory and now I see it like this, and cannot access it:

-rw-r--r-- 1 harendra harendra    463 Jul 14  2015 nmake.opt
d????????? ? ?        ?             ?            ? src
-rwxr-xr-x 1 harendra harendra   3977 Jul 14  2015 test-driver

Its amazing that such a serious bug has been lying around for more than 5 years. That's pathetic state of affairs. With such corruption bugs lying around shared folders are plainly unusable.

Last edited 8 years ago by harendra (previous) (diff)

comment:23 by harendra, 8 years ago

I got another data point which can perhaps help nail down the inaccessible directory problem at least. The problem (the weird permissions case as seen in the logs I pasted above) seems to happen when a file in the directory tree being renamed is open when the directory is renamed. Once the open file is closed and no process is accessing the old directory tree it returns to normal.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use