Data is missing

After migrating the elgg site script and database, every thing seems ok but for the files uploaded to server before migration e.g mp3 files do not download when clicked. No zaudio player is displayed.

Advice.

  • Have you also migrated the data directory? That's where the uploaded files are saved on the server.

  • Yes,I migrated the data folder and updated the path to data.The files are in the data folder but cant be called from the browser.Could the database base be the reason?

    The link on the download button is : /mod/westordownloadcounter/download.php?file_guid=787878

    Advice

  • A couple of things to check - make sure the file permissions are readable by the webserver

    Secondly, there is a secondary data path specifically for files that people seem to forget about, but it is documented: http://learn.elgg.org/en/2.0/admin/duplicate-installation.html?highlight=duplicate%20installation#change-the-filestore-data-directory

  • Have you only "migrated" your site, i.e. just moved from one server to another, or have you also updated Elgg? What version of Elgg are you using?

    The Westor Download Counter plugin has been written for Elgg 1.7 and it wouldn't be surprising if it fails to work on newer Elgg versions (possible Elgg 1.9 or newer). Any other plugin not fully updated to work on more recent Elgg versions (or the Elgg version you are using) can cause problems - including problems with serving files. For a start I would suggest to deactivate all 3rd party plugins to see if the problem still occurs then. If not, you know that one or more of these plugins are causing the trouble.

    Then the question if the permissions of the data directory, the files and directories in it are correct. If the webserver can't read the files, the files won't get served for download or to be displayed. Can you upload new files?

  • @Matt Beckett and iionly:Where do I find the file /folder permissions for elgg script?

    @iionly:I have not updated the elgg version after migrating.Still running the 1.9.6

  • It should work if you set 777 permissions for the data directory and everything in it. If your data directory is outside the document root directory (i.e. not accessible over the Internet) it shouldn't be to high a risk. Setting stricter access permissions (e.g. 755 for directories and 644 for files) would require to also change the owner of the files and directories to be the same owner as the webserver runs at.

    If in doubt, it might be best to get in contact with the support of your webhoster to ask them to do it for you or to ask them at least how to do it.

  • I noticed that the permissions to the folders I checked are set to 700. Its going to be a task going through all data folders to make changes via ftp without a cpanel.

    I run a VPS server and the hosting is not in the public_html folder before.

    The is paths are 

    For site: serverhome/folder-containing-site-scripts/

    For data file  : serverhome/folder/data

    with the path to data folder as stated, could it be safe to use 777 as you suggested?

  • If you have shell access to your server (via ssh), you can change the permissions recursively with chmod. If you don't have shell access but a administration tool like CPanel, there should be a filebrowser available in this admin frontend that should also allow to change the permissions recursivly. I'm not sure you can modify the permissions via ftp at all - maybe it works with some clients.

    If you have neither shell access nor a filebrowser (like in CPanel) you need to ask the support of your server to do it for you.

    777 permissions should be alright.

  • Thanks alot.I didnt know that filezilla has a feature to make recursive changes to the permission.Am handling it.

  • I have disabled the westordownload plugin.I see the photos uploaded on display on the site but when i download, they are 0kb. Same as mp3 files.