Where is the temporary file repertory


When I try to upload a file with Elgg, I get an error message telling me that there is no temporary files repertory. What is this repertory ? Is it the Elgg data repertory ? This one exists, and have the same owner/group the the Elgg install repertory and 770 as permissions.

Thank you

  • I don't know what the temporary files repertory - repository(?) - is supposed to be. I never came across such an error message and don't think such an error message even exists in Elgg core. Can you post the exact and complete text of this error message or a screenshot of it? Does only the uploading of files fail or does the same problem occur for example when uploading an image to be used as profile image?

  • Thank you for your answer

    In french, I have that :

    'upload:error:no_tmp_dir' => 'Impossible d\'enregistrer le fichier chargé (pas de répertoire temporaire).',

    but in english, there is that :

    'upload:error:no_tmp_dir' => 'Cannot save the uploaded file.',

    I guess there is a mistake in the french translation. Concerning the install directories, I have this :

    Elgg install :


    Data repertory :


    Both repertories have the same owner/group. I have tried to set permissions to 777 for data_elgg repertory without success. This repertory must be writable, though, since I have to new repertories written by elgg inside : system_cache, and views_simplecache. 

  • I find the error message in the code of uploaded.php

    UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.'

    in upload.php

    self::NO_TMP_DIR     => "No temporary directory was found for file '%value%'"

    and in uploadedfile.ph

    self::NO_TMP_DIR     => "No temporary directory was found for file"

    but I can't find anywhere the value of tmp_dir so I can know which repertory has wrong permissions. I have Elgg 2.3.3.

  • It happens too when I try to upload an image to be used as profile image

  • Problem solved. I had to add this directive for PHP to my subdomain configuration so it could find its temporary files directory :



    I've added the tmp directory with the right permissions in the data_elgg directory, and it works now.

  • Not sure why the automatic creation of the tmp folder would fail.

    Anyway, the path /var/www/vhosts/thamms.xyz/ looks to me to be the document root folder of the domain, i.e. everything in it is likely to be accessible over the Internet if you haven't configured access to the data_elgg folder specifically. Creating the data directory inside the document root folder is not recommented. It's recommented to create the data directory on the server outside the document root folder to be on the safe side.