Unauthorized Access Exception when trying to write to internal storage.

I’m trying to save a screen capture from an application I’m building.

ScreenCapture works great but it saves to persistent path and I want to put the screenshots in the camera folder. But trying to save the files there, moving them there or even just creating a new folder in internal storage returns the same result: “UnauthorizedAccessException: Access to the path “/sdcard/DCIM” is denied” (replace directory for wherever I’m trying to access).

My player settings are set to write permission internal but it doesn’t seem to help.

This may be a bit confusing, but in the player settings you have to set the write permission to external and not internal. This is because internal write permission means the app can only write to its own folder, while external write permission allows it to write to the sdcard.


If you set the write permission to external, your application will ask for permission to access photos and other media on startup, and you must click allow for writing to the sdcard to work.