Creating a new file in the root of an ext2 file system
<p>I am creating an application for Android which enables users to create encrypted LUKS partitions and then mount them to given directories on external memory.
For the partition to be usable I create an ext2 file system using the Busybox mkfs.ext2 command. The problem occurs once a user tries to create a file/directory at the root of the partition. For some reason it is impossible to create a file through Java as the "File.mkdirs()" method fails. However, it is possible to create this file through the command-line. And this error occurs only when at the root of the partition (i.e if I create a folder through the command line I am then able to create files within that folder through Java). Also, I am able to create a file if I create a vfat file system instead of ext2.</p>

<p>Any help would be greatly appreciated.</p>

<p>Harry</p>

<p><strong>EDIT</strong></p>

<p>Fixed. I was mounting the file system as root</p>
