I'm trying to unlock (and later mount) a veracrypt container like this:

sudo cryptsetup --type tcrypt --veracrypt open /home/me/my_container.vc my_container
sudo mount /dev/mapper/my_container /media/my_container

But when I look at the files in the container, some of them have incorrect encoding due to non-English characters being used. In VeraCrypt, I used to set iocharset=utf8 in Preferences > Mount options to solve this problem. How do I do this in cryptsetup?

Mind you: we're talking about the encoding inside the container, not about the encoding for the keyboard input.

1 Answer 1


iocharset is a mount option, not something VeraCrypt specific, just add it to your mount command:

sudo mount -o iocharset=utf8 /dev/mapper/my_container /media/my_container
  • Of course! Thanks for your reply, that solve that part of the problem. One issue remains: if I mount the device like that, I only have read access, but no write. The problem seems to lie with the ownership: all files are mounted with root as the owner. chmod -c -R my_username won't work / is rejected. What am I doing wrong?
    – ParaDice
    Commented Jul 7, 2021 at 14:34
  • 1
    I assume the filesystem is NTFS or VFAT, you can use uid/gid or fmask options, see this answer for details. You also do the mount with udisksctl mount -b /dev/mapper/my_container -o iocharset=utf8, udisksctl should take care of using the correct uid and gid values when called as non-root user. Commented Jul 7, 2021 at 19:45
  • Great, thanks for the hint mate! (I notice I've still got a lot to learn here.) You're correct, the filesystem is a FAT type. Using udisksctl does give me write permissions. However it doesn't seem to allow me to mount my container to a specific location: it just mounts it to /media/<username>/<someGenericName>. I'd like to mount it to /media/<specificFolder>. Is there a way to pass that as a parameter as well? I must admit I'm a bit overwhelmed by the man pages of both mount and udisksctl.
    – ParaDice
    Commented Jul 8, 2021 at 20:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .