1

I have a weird issue: I have made changes to a CSS document but when I upload it and overwrite the existing file nothing changes - the old file remains.

I have tried this on several FTP clients to the same effect. It appears to be only one web server affected. I can upload and download files fine - just not overwrite existing files.

Does anyone know what could be causing this? (permissions are 644).

Simon Hayter
  • 33,097
  • 7
  • 60
  • 119
MeltingDog
  • 1,373
  • 3
  • 21
  • 36

3 Answers3

1

It's the browser cache that does this. For chrome go to the three dots on the right corner and click 'more tools'. Then select 'clear browsing data ' and make sure cache is enabled. When you did this close chrome and reopen the site.

1

There are three possibilities why this is happening that I can think off:

  • WWW-DATA Ownership
  • ROOT Ownership
  • FTP Server Settings

WWW-DATA Ownership

The file on the server may belong to another usergroup that the FTP user is not a part of. Assuming that your web server uses the standard www-data group, you should ensure that the FTP user has permission to write changes to this group. Alternatively you could try changing the chmod of this file to 777 meaning that anyone can write to it regardless of group. If this fails you may need to login on the SSH level to do the chmod rather than the FTP side.

ROOT Ownership

Ensure that the file that you're writing to is not owned by root, at some point you may have used something like SSH to transfer though the file and this may be one of the reasons why some of your files are root.

FTP Server Settings

Finally you should ensure that the FTP server is not blocking you making an overwrite command. FTP server applications such as ProFTPD have settings that can block this, for example: AllowOverwrite off check the config file to rule this out or alternatively a work around could be to download the file locally and make your changes as required and rather than overwriting the file, simply delete it.. and then make a new file.

DisgruntledGoat
  • 21,658
  • 5
  • 56
  • 101
Simon Hayter
  • 33,097
  • 7
  • 60
  • 119
1

Are you sure that nothing changes ? It might be due to your browser cache.

To check this upload the file to the server then download it and see if it's the new or the old one.

You should also delete your browser cache.

Alex Dumitru
  • 460
  • 3
  • 7