Set the folders to 777 and files inside to 666 .

If the script does not have permission to write to these folders such as templates, images and languages you will not be able to update and add to them from within threads.