title: Flutter: Permission denied writing file
body: <p>I am having a problem writing a file in Flutter. I keep getting this error:</p>
  
  <p><code>FileSystemException: Cannot create file, path = '/data/local/tmp/temp.png' (OS Error: Permission denied, errno = 13)</code></p>
  
  <p>For some reason, it's only happening on some devices. I can't seem to duplicate the problem myself, but people are reporting it to me.</p>
  
  <p>Here's the basic code:</p>
  
  <pre><code>final Io.Directory systemTempDir = Io.Directory.systemTemp;
  final Io.File file = await new Io.File('${systemTempDir.path}/temp.png').create();
  file.writeAsBytes(finalImage);
  </code></pre>