RIPSIKE / cryptonite

Automatically exported from code.google.com/p/cryptonite
GNU General Public License v2.0
0 stars 0 forks source link

TrueCrypt sets wrong permissions on FAT32-formatted SD card #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

1. Create a TrueCrypt container volume called myvol.tc on Windows.
   Mount it and move a text file to the mounted drive.
   Copy it to /mnt/sdcard/encrypt/myvol.tc on the phone

2. Run this script to mount a TrueCrypt volume
su
export tcvolume="/mnt/sdcard/encrypt/myvol.tc"
export tcmount="/mnt/sdcard/mnt/mydrive"
/data/data/csh.cryptonite/truecrypt -t -k "" --protect-hidden=no -p password 
$tcvolume $tcmount

3. The volume mounted successfully at /mnt/sdcard/mnt/mydrive.

What is the expected output? What do you see instead?

Browse using Root Browser of ROM Toolbox and I can see the text file.  However, 
when I browse using ESExplorer or other apps, the mounted folder is empty.

What version of the product are you using? On what operating system?
Cryptonite 0.6.12
Android 4.0.4, AOKP ROM Build 39 on Nexus S GSM

Original issue reported on code.google.com by tonynguy...@gmail.com on 24 Jun 2012 at 4:08

GoogleCodeExporter commented 8 years ago
Supposedly that's a permission problem? From a root terminal, what's the output 
of

ls -l -a /mnt/sdcard/mnt/mydrive

after mounting with truecrypt?

Original comment by christoph.schmidthieber@gmail.com on 24 Jun 2012 at 9:36

GoogleCodeExporter commented 8 years ago
-rwx------ root    root    1022 2012-06-23 22:15 sample.txt

Here's what I see with the permissions for /mnt/sdcard/mnt/mydrive
Before running truecrypt mounting script
Permissions: ---rwxr-x
Owner: 1000 - system
Group: 1015 - sdcard_rw

After mounted
Permissions: rwx------
Owner: 0 - root
Group: 0 - root

I tried to change permissions and owner using Root Browser or chmod, chown 
commands, all failed.

Original comment by tonynguy...@gmail.com on 24 Jun 2012 at 2:59

GoogleCodeExporter commented 8 years ago
Ok, it seems the internal SDCard is formatted with FAT32, so changing 
permissions/owners are not allowed/supported. I'll keep researching and see if 
I can mount the SDCard differently.  Not a defect/bug of Cryptonite, you can 
close this Issue.

Thanks!

Original comment by tonynguy...@gmail.com on 25 Jun 2012 at 3:10

GoogleCodeExporter commented 8 years ago
Thanks for reporting. Not entirely sure this is a FAT32 issue though. Might be 
a problem with the TrueCrypt code for Android.

Original comment by christoph.schmidthieber@gmail.com on 25 Jun 2012 at 8:43

GoogleCodeExporter commented 8 years ago
Try mounting the TC volume using: truecrypt 
--fs-options="uid=1000,gid=1000,umask=0002" volume.tc /sdcard/tc.

Original comment by pka...@acrobits.cz on 12 Jul 2012 at 12:15

GoogleCodeExporter commented 8 years ago
You sir are a genius! Adding the --fs-options worked perfectly. Thank you!!!

Original comment by tonynguy...@gmail.com on 13 Jul 2012 at 10:13

GoogleCodeExporter commented 8 years ago
@pkalny: Thanks for reporting this fix. I've added it to the FAQ.

Original comment by christoph.schmidthieber@gmail.com on 14 Jul 2012 at 4:59

GoogleCodeExporter commented 8 years ago
Actually, should set gid=1015 (which is the sdcard_rw group) so files can be 
moved/copied to the mount point using file managers other than root explorer.  
At least, that's how it is on my Nexus S.

Original comment by tonynguy...@gmail.com on 16 Jul 2012 at 11:10