File size 0 Kb after migration to new server - how to fix?

Good afternoon!

Migrated to a new server recently, and got a problem - group uploaded files are seen on group page, they are there on the server, but when the user tries to download the file, it downloads allright, but the file size is 0 KB and it would not open.

Interestlingly enough that files that I upload now after migration can be downloaded without problem.

What went wrong and how to fix it?

Thanx!

 

 

 

 

  • It sounds lile File ownership is wrong - if the files where uploaded with FTP then they will probably have different ownership to files uploaded using elgg itself.

  • Anybody had the same situation and found a fix?

  • Never copied the files?

  • Cash, is your question rethorical?:)

    Previously cahaging permissions on data folder usually helped, but not this time. What do I do? 

     

  • @Ragga - This document isn't exactly your problem, but the solutions still would apply. Give them a try: http://docs.elgg.org/wiki/No_images

  • @Brett. Thanx for the hint. Tried out everything - dead in the water... There they are - files both side to side in users' folder on the server - the one uploaded after the migration is downloadable just fine, the one that was uploaded before the migration - still gives the 0Kb.

    I guess I just apologize to users and ask to delete all te old files and reload them again...

     

     

  • Server migrations can cause lost images if:

    1. The images are not copied to the new server

    2. The permissions are not set correctly (web server cannot read the images)

    3. The data root directory is not changed

    4. The filestore::dir_root metadata variable is not changed

    All of this is documented at http://docs.elgg.org/wiki/DuplicateInstallation

  • @Cash

    must be 4., although I did run the query as per instruction: 

    -------------------------------------------------

    Change the filestore data directory

    (Only change the first path here!!)

    UPDATE elgg_metastrings set string = '/var/data/elgg_test/' WHERE id = (SELECT value_id from elgg_metadata where name_id = (SELECT * FROM (SELECT id FROM elgg_metastrings WHERE string = 'filestore::dir_root') as ms2) LIMIT 1) ;

    ----------------------------------------

    how do I check to learn if the DB is ok or I need to rerun the query? any other suggestions?