Ticket #9789 (closed defect: obsolete)

Opened 8 years ago

Last modified 3 years ago

Problem reading files on shared drive after upgrading 4.1.4

Reported by: martinkirk Owned by:
Component: shared folders Version: VirtualBox 4.1.4
Keywords: Cc:
Guest type: Linux Host type: Windows

Description (last modified by aeichner) (diff)

I have recently upgraded from 4.0.12. to 4.1.4. I am running a Linux guest (RHEL5) on a Windows 7 host.

I am using the VM to test development of a web-based PHP application, and all my files are edited and maintained in the Windows 7 file system, which is mounted as a shared drive on the host system. I am running Apache 2.0 on the gust system to process and display the web pages.

Since the change, the formatting of my web pages has gone awry, apparently because some of the files are not being read correctly. As an example, Apache is reporting that it is having problems reading my CSS file. Looking at the error in the Apache error console, and clicking the filename, it comes up with a lot of unreadable characters, much as you would expect if you open a binary file in a text editor.

If I use a text editor on the Linux guest system to open the CSS file, it looks fine. Also, it appears to be having no problems running the PHP scripts, which are also plain text files, and edited and maintained with the same tools.

If I reload 4.0.12, the old (correct) behaviour returns, which would seem to rule out problems in the shared files themselves.

It is as if something has changed in the handling of shared drives which is affecting the content of files under some circumstances. Something to do with character set handling suggests itself, but that would just be an uniformed guest.

Change History

comment:1 Changed 8 years ago by martinkirk

If helpful, screen shots can be provided to illustrate the problem.

comment:2 Changed 8 years ago by michael

  • Guest type changed from Solaris to Linux

Just to be clear about this. Are you using VirtualBox shared folders or Windows folder sharing? And the problem is that you can open the CSS files in a text editor on the host and the guest but Apache doesn't like them any more?

comment:3 Changed 8 years ago by martinkirk

I am using VitrualBox xhared folders. And yes, your understanding of the situation is correct.

I am using the version of Guest Additions with the same version number as VirtualBox in each case.

My word around has been to downgrade to 4.0.12, which is working fine.

comment:4 Changed 8 years ago by ManU

I got exact the same problem, running as Host Linux and as vm Linux Debian with apache. I also got soemtimes a forbidden error. Since all works fine with earlier versions it IS a regression. It is possible to copy "corrupted" files locally into the machine, then accessing them trough a browser works fine!

comment:5 Changed 7 years ago by ubeinges

I've had a similar issue with WindowsXP guest on a Windows7 host using VirtualBox versions from 4.1.14 to 4.2.4. The issue was: Files on a shared folder mounted in WinXP seem to be corrupted or empty when opened by windows programs unless I open them once in a DOS command box (example: dos command "type"). After that, all files in the shared folder became accessible also from within Windows programs like Word or Wordpad. The procedure has to be done for each shared folder. A downgrade to 4.0.16 fixed the problem. Now the files are accessible and intact from the v ery beginning no matter if I use DOS or windows programs.

comment:6 Changed 6 years ago by dlanghorne

I have experienced this recently. I am running VirtualBox on a Macbook Pro running Mountain Lion. My virtualbox is the latest (4.2.10) as of this posting. I recently decided for numerous reasons to stop running Apache directly on my mac. I am doing ColdFusion development, so I setup a virtualbox running Ubuntu 12.10 server with Apache 2.2.24 and Coldfusion 10.

To make things as seemless as possible, I kept the webserver files on my mac and used VirtualBox shared folders so that the ubuntu VM would be able to access them that way.

When I initially boot up everything is fine, there are no problems, but if I edit a javascript file it seems every single time the file becomes "corrupt" as far as Apache is concerned. I confirmed this by navigating directly to the javascript file in my browser and the source displayed is always either truncated and/or has non-ascii characters. If I open the file on my macbook directly, it does NOT display those characters, also if I open the file inside my ubuntu VM from the terminal using say VIM, the file looks fine, it's apache that is somehow having issues.

My apache config is fairly straightforward and I don't have any caching modules enabled. In fact I setup an identical ubuntu VM in Parallels with identical apache config files. Parallels setup is also using shared folders.

If I restart the VM, my changes are then recognized that the js files are fine again.

I will add that CFM, CFC files NEVER exhibit this problem and I can edit them without any problems, it's only JS files. I have not edited any css files recently, but I would assume any file that Apache is handling directly (IE CFM files are passed to CF Server) as would say PHP files be passed onto the PHP processor.

I may try and reverse things and keep the files locally in the guest and access guest drive as shared folder on my mac, but there seems to be some problem with Shared Folders and Apache at a minimum. Again, my apache config is largely stock, with the only changes having to do with my virtual drives. I don't have a special setup or extra security in place since this is a private VM that isn't publicly available, for instance the folder.

comment:7 Changed 5 years ago by Bosbaba

Ok looks like nothing is happening on this ticket but I can confirm the same issue, with both css and js files. I'm running Virtualbox Graphical User Interface version 4.2.16_Ubuntu r86992 on Ubuntu 13.10 locally and Debian GNU/Linux 7 in the VM that is sharing a directory. I'm running Nginx as a webserver on the VM so can also deduce that it is not an Apache issue.

When editing js or css files locally and viewing them throught the webserver on the VM extra non-ascii chars get added. Works perfectly if edited on the VM. Other file types seem to work fine, its just .js and .css files that I've found the problem in.

Last edited 5 years ago by Bosbaba (previous) (diff)

comment:8 Changed 3 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete
  • Description modified (diff)

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use