File upload error. Could not move uploaded file I am getting this error while changing the logo of my site,

i  have tried changing the permission through hosting provider, added php_value safe mode 0 in .htaccess file and even added one file in drupal folder named php.ini with 

safe_mode = Off
file_uploads = On
upload_max_filesize = 256M


but still i am unable to change the logo and getting the error 


  File upload error. Could not move uploaded file.
Had a same problem. The best way to fix it is to:


Update the folder permissions on /sites/default to 777
Remove /sites/default/files folder
Go to /admin/config/media/file-system and click save so drupal re-creates the files folder.
Update the folder permissions back to 755 on /sites/default.


On my server when website creates a file or folder, the owner is set to nobody.nobody and since I already had a lot of files in my /sites/default/files folder all I had to do is update the ownership and permissions:


chown -R nobody.nobody ./sites/default/files
chmod -R 755 ./sites/default/files


Good luck!