1

I have an apache webserver that has the code mounted through SSHFS. When I make a change to a file on the remote computer, the webserver does not show the change. If I interact with the file in any way, such as cat or vim and do not make any changes, then the webserver will show the change correctly and the file modification time updates.

Is there a way to get the file modification time to update correctly, or perhaps I need to modify apache in some way so that it definitely reads the files (perhaps there is some sort of cache based on times that it uses which I could disable)?

4
  • Where are you cating from? What happens if you write wait a minute, then try to access the page? Apr 9, 2015 at 13:05
  • 1
    The manual for sshfs mentions some caches, you can change the time-outs on them. Apr 9, 2015 at 13:07
  • Have a look at this tutorial digitalocean.com/community/tutorials/… whether this helps.
    – BDRSuite
    Apr 9, 2015 at 13:09
  • @richard You were right about the cache. If you add -o cache=no to the sshfs command then the changes are immediate. If you put that in an answer, I will mark it correct. Apr 9, 2015 at 14:36

1 Answer 1

2

The manual for sshfs mentions some caches, you can change the time-outs on them.

Try -o cache=no. If that works, then consider setting the time-out to some low number.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .