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?
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.