This article covers to fix mysqldump error "can't create/write to file" for our customers. This error can be as a result of lack of space in your /tmp keeping the file from being created. It may also be the result of a permissions error or configuration error.
We recommend restarting the service to clear any excessive temporary files:
$ /etc/init.d/mysqld restart
If that doesn't improve the situation, we recommend reviewing your configuration file and permissions, particularly if you are using SE Linux:
$ cat /etc/my.cnf | grep tmpdir
$ ls /var/tmp