On Thu, Dec 29, 2011 at 6:34 AM, guich <[email protected]> wrote: > In native code when we create a file, it creates it with 666 > permissions (rw * 3). > > In Java, it creates with 600.
Java's is the right answer. Do not make files that are readable, let alone writeable, by UIDs other than the file owner. > Is there a way in Java to specify the permissions when creating the > file? Use openFileOutput(), bearing in mind the security implications and the fact that it cannot handle subdirectories. > Or maybe change it afterwards? Not that I am aware of. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

