1

I'm logging in through SFTP using WinSCP. I am able to see all the files of my website and the whole directory structure. However, if I try to edit a file, e.g. an HTML or CSS file, I am able to re-upload it to the server but the changes don't take effect on the website! I thought it was a permissions issue so I assigned 0777 using WinSCP to all the files and directories on the website, but still no changes take effect. What am I doing wrong that I can't edit files--only VIEW them--in WinSCP?

  • Are you sure you are not modifying a COPY of the file that WInSCP has put in temp or elsewhere and then not re-uploading that copy? Have you setup an external editor as per winscp.net/eng/docs/ui_pref_editor#preference ? – ssnobody Jun 12 '15 at 1:14
  • Do you have a shell access to the server? Can you check file timestamp (in shell, not WinSCP) before the upload and after the upload? Is it changed to a later time after the upload? – Martin Prikryl Jun 12 '15 at 7:22
0

Provided that the directory you are modifying is in fact the webroot, the changes should take effect right away, unless cache is ruining it for you.

First of all, ensure that there is no serverside cache running, such as Varnish. After that, ensure there's no transparent caching somewhere on your end, such as Squid. With those two out of the way, try clearing your browser cache. If still no luck, ensure that the webserver is in fact reading the directory you are modifying as the webroot.

If all else fails, you can consult the server log, and what you want to look for is a response of 304 or anything related to a cache hit.

  • I believe it might be some server side cache like Varnish because I just SSH'd into the server and the files are there. How do I clear/reset the cache on the server? Is there a Linux command I can use? – Rick Helston Jun 11 '15 at 20:57
  • @RickHelston If it is Varnish, then the correct command is varnishadm -T 127.0.0.1:6082 url.purge – Jarmund Jun 11 '15 at 21:33
  • Before purging, is there a way to test if I do have Varnish installed on the server? – Rick Helston Jun 11 '15 at 21:40
  • ps aux | grep varnishd – Jarmund Jun 11 '15 at 21:50
  • Tried varnishadm -T 127.0.0.1:6082 url.purge but it didn't work. – Rick Helston Jun 11 '15 at 21:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.