title: Error: EXDEV: cross-device link not permitted, rename '/tmp/ on Ubuntu 16.04 LTS
body: <p>I have problem upload file nodejs. i have read 
  <a href="https://stackoverflow.com/questions/4568689/how-do-i-move-file-a-to-a-different-partition-or-device-in-node-js/29287813#29287813">stack1</a> 
  and 
  <a href="https://stackoverflow.com/questions/12196163/node-js-fs-rename-doesnt-work">stack2</a>. but i think this different case 
  on terminal output like this : </p>
  
  <pre><code>&gt; Unhandled rejection Error: EXDEV: cross-device link not permitted,
  &gt; rename '/tmp/31941-53enly.png' -&gt;
  &gt; 'public/files/complaint/Screenshot_2016-05-01_01-16-55.png'
  &gt;     at Error (native)
  &gt;     at Object.fs.renameSync (fs.js:681:18)
  &gt;     at null.&lt;anonymous&gt; (/home/faris/myprojects/orchestrale-server/routes/complaintimage.js:163:20)
  &gt;     at tryCatcher (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/util.js:16:23)
  &gt;     at Promise._settlePromiseFromHandler (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:502:31)
  &gt;     at Promise._settlePromise (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:559:18)
  &gt;     at Promise._settlePromise0 (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:604:10)
  &gt;     at Promise._settlePromises (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/promise.js:683:18)
  &gt;     at Async._drainQueue (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/async.js:138:16)
  &gt;     at Async._drainQueues (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/async.js:148:10)
  &gt;     at Immediate.Async.drainQueues [as _onImmediate] (/home/faris/myprojects/orchestrale-server/node_modules/sequelize/node_modules/bluebird/js/release/async.js:17:14)
  &gt;     at processImmediate [as _immediateCallback] (timers.js:383:17)
  </code></pre>
  
  <p>my code :</p>
  
  <pre><code>  if (_.isEmpty(req.files) == false) {
        var tp = avatar_folder+req.files.file.name;
        fs.renameSync(req.files.file.path, tp, function(err){});
        var avatar = req.files.file.name;
        }
  </code></pre>
  
  <p>code work on another distro like elementary os, but when i run project on debian jessie or ubuntu 16 LTS that error result on terminal. </p>
  
  <p>any body can't help ? that code just run perfectly on elementary os and arch. </p>