Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I would like to mount an ext4 truecrypt drive with --fs-options but it doesn't work. Also I created a FAT partition and the following command is working. What is the alternative command if my partition is ext3/ext4?

sudo truecrypt --mount /media/vulturus_data/test3 /media/true  --fs-options="users,uid=115,gid=123,fmask=0113,dmask=0002" 
share|improve this question
add comment

3 Answers

up vote 3 down vote accepted

Those filesystem options are available for FAT because FAT does not support file permissions. Ext2/ext3/ext4 filesystems on the other hand do support file permissions. After mounting the container on /media/true:

  • Change ownership and group membership (corresponds to uid=115,gid=123):

    sudo chown -R 115:123 /media/true
    
  • fmask=0113 removes the executable bit from all files and write bit from the others. This is the default, so you should not need to change it. Anyway, the command to do so is:

    sudo find /media/true -type f -exec chmod a-x,o-w {} \;
    
  • dmask=0002 is supposed to remove the write bit from directories for the world. This bit is usually not set. To remove it in case it is set:

    sudo find /media/true -type d -exec chmod o-w {} \;
    
share|improve this answer
add comment

make sure there's a directory under /media/ called true

run the following commands to make sure

sudo mkdir /media/true
share|improve this answer
    
The directory is there, I created that. –  Kicsi Mano Feb 7 '12 at 16:30
add comment

Probably --fs-options="..." must be put before the volume path and mountpoint:

sudo truecrypt --mount --fs-options="users,uid=115,gid=123,fmask=0113,dmask=0002" /media/vulturus_data/test3 /media/true

share|improve this answer
    
I tried in this way also without success –  Kicsi Mano Feb 7 '12 at 16:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.