6 Replies Latest reply on Jul 17, 2014 10:11 AM by abrama

    Guest doesn't recognize file changes

    abrama Novice

      I have an Ubuntu 14.04 Host and a Win2k8 Guest.  I have my source code (html) files on the host and share them to the guest via Samba.  If I make small file edits to the file on the host, the guest does not recognize the file changes (i.e. I browse to the edited html page in chrome and changes aren't visible). Now, if I navigate to the file on the guest via Windows Explorer, and open the file I see the changes. I can then close the file without saving and on the Guest, refresh the browser and the changes are visible.  I've notice that this happens usually when making small changes within the same minute.  For instance if I make a change at 11:59pm, check in the browser to see the change it will not be visible (nor will any subsequent changes saved at 11:59), but if at 12:00am I save the file again on the Host the Guest will finally recognize the changes.


      This has become very, very frustrating as I'm never sure if the code changes I've made are not working or just haven't been recognized by the guest.  I would hate to have to edit the files directly in the guest, but at this point this may be my only option.


      FWIW, I tried using shared folders, but that didn't work very well with IIS on the guest because I couldn't ever get the permissions worked out correctly.  If anyone has any suggest, I'd be very happy to try them.


      I am running VMWare Player 6.0.3 build 1895310 and have "downgraded" the VM Tools to version 9.6.2 build 1688356 per this thread ( vmghfs file corruption when file written by eclipse ) thinking my issue may be related to the bug described there.  I've also experienced the changes not recognized problem on the latest VM tools.

        • 1. Re: Guest doesn't recognize file changes
          a.p. Guru
          Community WarriorsvExpertUser Moderators

          Of the changes are visible from the Windows Explorer, but not from Chrome, then I think is a caching issue with the browser!?



          • 2. Re: Guest doesn't recognize file changes
            abrama Novice

            No, cache is turned off, and I've manually flushed.  Opening and closing the file on the guest would not cause the changes to be visible if it were a browser caching issue.



            Also, I have other files that are server side (i.e. handled by Java Servlet Container) that have the same issue.


            (BTW, thanks for the help)

            • 3. Re: Guest doesn't recognize file changes
              dariusd Virtuoso
              User ModeratorsVMware Employees

              I concur with André's assessment: If you are using Samba to share the files, there's nothing different about doing this in a VM compared to using physical machines. I'd double-check the host's samba configuration to make sure that it isn't being too aggressive with caching file metadata... maybe it is hiding the file updates from the client and Windows Explorer is being a bit more forceful about obtaining the latest file metadata.



              • 4. Re: Guest doesn't recognize file changes
                abrama Novice

                Thanks Darius, any pointers on how to disable file metadata caching in Samba?  I'm doing some googling but haven't seen a good explanation yet.

                • 5. Re: Guest doesn't recognize file changes
                  dariusd Virtuoso
                  User ModeratorsVMware Employees

                  Hmmm... not immediately.  It's been a looooong time since I played around with samba.


                  From a quick glance through "man smb.conf", one parameter you might want to investigate is "dos filetime resolution"... just in case that is confusing matters.


                  What's the underlying filesystem on the host side from which samba is obtaining the data?  I'd be suspicious of the noatime or nodiratime mount options... they might also prove confusing for samba and/or the client, so it might be worth removing those if they are present.


                  To be clear: These are both guesses at best... but that's all I have for now.





                  • 6. Re: Guest doesn't recognize file changes
                    abrama Novice

                    Darius - thanks for the suggestions. Unfortunately I have still been unable to get this working.  I've tried changing/disabling every config option in samba to no avail.  One thing I did find was that restarting smbd forces the guest to pick up the latest file changes.  So, every time I save the file and wish to run the app I have to restart smbd.


                    I'm absolutely lost as to why this would be.  I use samba/vmware on my windows host to a linux guest and don't have this problem.  Its only on my linux host to windows guest where it falls down.


                    Any other suggestions?