Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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

share|improve this question
1  
Are you the owner of the file? Your permissions allow only for the owner to write to the file, not "group" write. –  nathangiesbrecht Apr 22 '13 at 2:12
    
Are you saying that the file size/date info doesn't appear to change in your FTP client? Or can you not see the changes when you open the file in your browser? –  Andrew Lott Jun 10 '13 at 15:08

2 Answers 2

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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